Skip Navigation

[Resolved] Displaying search view markers on map

This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

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 10 replies, has 2 voices.

Last updated by joelK-5 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2348005
view.jpg
search view.jpg
map id.jpg
marker id.jpg
no marker shown.jpg
map shortcode in Elementor.jpg

Hi,

I have a search view that works correctly and have put a map under it to display the results from the search view.

I have attached pictures to show everything. The Map ID is "map-4" and the Marker ID is "marker-4". I have the marker setup to show the "footage-location" of posts.

The shortcode I am using to display the map over the search view on the page is:

[wpv-map-render map_id="map-4"]
[wpv-map-marker map_id="map-4" marker_id="marker-4" marker_field="footage-address"][/wpv-map-marker]

However, the map is rendering with no markers?

I would appreciate any help you may offer please.

Kind regards,
Joel

#2348415

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You will have to make sure that the marker shortcode marker_id should be unique. For example:

[wpv-map-marker map_id="map-4" marker_id="marker-[wpv-post-id]" marker_field="footage-address"][/wpv-map-marker]

You will also have to make sure that you will have to put the marker shrotcode within your view's loop output section.

Can you please make the above changes and check if that helps you to resolve your issue.

#2348523

Hi Menish,

Thank you for your suggestions. I am not sure I have implemented this correctly as I am still not having any luck. Am I able to give you access to my site please?

Kind regards,
Joel

#2348527

Minesh
Supporter

Languages: English (English )

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

Yes, sure.

Please share problem URL where you added the map with view and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2348591

Minesh
Supporter

Languages: English (English )

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

What if you try to add the following shortcode:

[wpv-map-marker map_id="map-4" marker_id="marker-[wpv-post-id]" marker_field="wpcf-footage-address"][/wpv-map-marker]

Can you please try and check if that helps?

#2348641

Minesh
Supporter

Languages: English (English )

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

Please check now: hidden link

I've moved the map shortcode within the view as you can see with the following screenshot:
=> hidden link

And added the marker shortcode as given under using "fields and text" block:

[wpv-map-marker map_id="map-4" marker_id="marker-[wpv-post-id]" marker_field="wpcf-footage-location"][/wpv-map-marker]

I can see its working as expected. Can you please confirm it works at your end as well.

#2349053

Hi Minesh,

Thanks for your help. I have a few issues still with the map.

1. The markers do not update when the search results are changed. For instance, if you change the location searched to say "Brisbane, Queensland" there will be no results showing in the search results. However, the map still shows the original search post on it.

2. Now that the map is added by shortcode, I am not sure how to add pop up information so that when you click on a marker you can see what post it relates to.

Any suggestions?

Kind regards,
Joel

#2349377

Minesh
Supporter

Languages: English (English )

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

I've created the following content template and I've added the map block and view block together - you can adjust the spacing between the view and map as per your requirement by adding separator:
=> hidden link

With map block, I've also added the [wpv-post-link] shortcode to marker popup section so it will display the related post link. Please check the following screenshot: hidden link

Then, to your elementor template, I've added the above content template using the shortcode module:
=> hidden link

[wpv-post-body view_template="ct-for-search-with-map"]

I can see its working here: hidden link

Can you please confirm it works as expected.

#2350113

Hi Minesh,

Thanks mate for tour help. It is almost functioning correctly. It seems to not be refreshing the map correctly though.

It refreshes the map the first time a search filter is changed but never again after. For example, if you change the location to search within 10km of Perth, Western Australia the post goes away and the map updates. But if you then change it to search within 20km of Perth it brings the post back in the view but not the map.

Bit of a strange one.

Kind regards,
Joel

#2350447

Minesh
Supporter

Languages: English (English )

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

Could you please check now and see if it works as expected.
=> hidden link

#2351093

Working great now Minesh. Thanks so much mate.