Skip Navigation

[Resolved] Maps displaying wrong location when no result found

This thread is resolved. Here is a description of the problem and solution.

Problem:
Maps displaying wrong location when no result found

Solution:
You should add following marker code just after the [wpv-no-items-found] shortcode within your view's loop output section to display default search location (location text).

[wpv-map-marker map_id="map-contact" marker_id="marker-111" address="[wpv-search-term param='toolset_maps_distance_center']"][/wpv-map-marker]

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/maps-displaying-wrong-location-when-no-result-found/#post-1120530

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance

This support ticket is created 6 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 5 replies, has 2 voices.

Last updated by sandraD 6 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1119906

Hello,
I use toolset maps to display result of search location on my website.
All is ok when toolset found results but display the wrong location when ther is no result.

I want to display the good location even if there is no result.

to be clear :
hidden link

If we search "Bordeaux, France", there is results and the map have good location,
but if we search "Lourdes, France", there is no results (that's normal) but the location is not OK, the map is located somwhere in the ocean.

Can you help me ?

#1120442

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As I understand, you want to display a specific location on map when no results found?

#1120479

Hello,
Thank you for your response.

Yes, i want to display the location that we search, even if there si no result.

If we search "Lourdes, France" i would like that the map is located in "Lourdes, France" even if there is no result founds.

#1120486

Minesh
Supporter

Languages: English (English )

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

Could you please share details how you setup your view.

It will be a great help if you share problem URL and access details that will help me to fix your issue quickly.

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

#1120530

Minesh
Supporter

Languages: English (English )

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

Well - I've added following marker code just after the [wpv-no-items-found] shortcode within your view's loop output section.

[wpv-map-marker map_id="map-contact" marker_id="marker-111" address="[wpv-search-term param='toolset_maps_distance_center']"][/wpv-map-marker]

I can see not it's displaying default location as per search string. Could you please confirm.

#1120575

Thank you !
it's working It's perfect !