Tell us what you are trying to do?
I try to add a distance search to a page. The page contains a View for Location post types. They have an Address field. The page further shows a map. The map successfully presents the Locations loaded by the View. So selecting and showing Locations in View and Map works.
I've added a search field successfully, too. So I'm able to search for Locations by title, content and custom fields now.
I just can't find a way to add the distance filter pointed out in the docs. There is no Distance button in the filter section of the view. Can you please instruct or show where to find it?
Is there any documentation that you are following?
https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/
Hi,
Thank you for contacting us and I'd be happy to assist.
Your screenshot ( Page_Map_2.png ) shows the part of the list that shows the custom fields. The filter for the distance search is available at the start of the list, under 'Toolset Maps'.
( example screen-cast: hidden link )
Also instead of adding the distance query filter directly, from the 'Content Selection' tab, you'll need to add it as a search field, through the 'Add Search Field', button in the view's search, as shown in my screen-cast.
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
So if I understand you correctly, there should be a Toolset Maps section on top of the list?
I searched the whole list in both areas (search fields and view filters), but there is no such section and no Distance field. Would I have to activate that somewhere?
> So if I understand you correctly, there should be a Toolset Maps section on top of the list?
- Yes, that is correct and if it is missing, it will need to be investigated.
Can you please share temporary admin login details, along with the link to the page where this view can be seen?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank you for sharing these access details.
While I can see the issue of the missing distance search option on your website, I couldn't reproduced this on my test website.
This suggests that something specific to your website is involved. Do I have your permission to download the clone/snapshot of your website? This will help in troubleshooting this on a different server.
Yes, you may download it for debugging purposes. Please let me know when the admin access to my version is no longer required.
Thank you for the permission.
During testing on your website's clone, I noticed that the there is no Google Maps API key saved in the Toolset Maps settings.
Even when 'Microsoft Azure Maps API' key is being used for primary map operations like the map display and address field location Geo-coding, Google Maps API is needed for the distance based search and ordering.
Here are the steps that you can follow:
1. You can temporarily switch to 'Google Maps API' option at WP Admin -> Toolset -> Settings -> Maps, for the API usage.
2. Create a Google Maps API key and save it in the 'Google Map API key' field.
( ref: https://toolset.com/course-lesson/creating-a-maps-api-key/ )
3. Once it has been saved, you can switch back the API usage option to 'Microsoft Azure Maps API'.
After that, the Google Maps API key will be used for the distance based operations and for the rest, Microsoft Azure Maps API key will be used.
Thank you, my issue is resolved.
Just a note for your information. After I added the Google Maps key, I played around with the distance search within 5 km of my current location using Google's distance search and Bing's map. I noticed that the centre of the map is at coordinates 0,0 and not at my current position in the 5 km search. I suspect that this is because there is no marker in the 5 km area, so the map falls back to 0,0. The map should reflect the user's input in this case, even if there are no markers there.