Skip Navigation

[Resolved] Display markers on map (one of all not working)

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Minesh 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2625319

I am trying to display a marker on a map. All the items within the loop are displaying correclty on the map except for the first one in the loop using the following code...

[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_title='[wpv-post-title]' marker_field='wpcf-adresse']
<div class="et_pb_column et_pb_column_1_3">
[wpv-post-featured-image]
</div>

<div style="padding:15px;" class="et_pb_column et_pb_column_2_3">
<h1 style="color:#fff">[wpv-post-title]</h1>
<p>[types field='adresse'][/types]</p>
<br>
Visit Website
</div>
[/wpv-map-marker]

<article class="card">
<div>

[wpv-post-featured-image size="et-pb-post-main-image"]

<br>
<h2>[wpv-post-title]</h2>
</div>
<div class="tags">
<div class="tag">[types field='location'][/types]</div>
</div>
</article>

hidden link

Click on "Electic monkey" aka the first item and it does nothing on the map... All the other items display information on map once clicked. Can you help me understand whats going wrong?

#2625323

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to use the following code and check if that help you to resolve your issue:

<a href="" class="js-wpv-addon-maps-focus-map js-toolset-maps-hover-map-map-1-marker-marker-[wpv-post-id] js-toolset-maps-open-infowindow-map-map-1-marker-marker-[wpv-post-id]" data-marker="marker-[wpv-post-id]" data-map="map-1" data-marker="marker-[wpv-post-id]">
[wpv-post-featured-image size="et-pb-post-main-image"]</a>
#2625873

Thank you for your response. Unfortunately this did not work. The first option/thumbnail/item in loop still does not display on map when you click on it.

#2625987

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I will require admin access details in order to check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2626053

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm not sure why you created two views, I can see you created one view to display the map and another view to display the posts. This is not good practice.

You will require only one view and to that view you should add the map and also list posts.

Here is the example I set with the following view:
- hidden link

As you can see I've added map shortcode outside the view's loop and the marker shortcode inside the loop and other post fields inside the loop.

You can check the view on the following test page: hidden link

If you click on the link "View on Map" I can see its working as expected and shows the correct result for all posts.

You should follow the above view example and make changes to your view and page output accordingly.

#2627255

Yes clear, Issue is resolved, thank you much!