Tell us what you are trying to do?
I have a custom post type that has an Custom Field of type Address. When visitor search by providing an address (or their current location) I want the search results to be displayed sorted by proximity to the address submitted.
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/?utm_source=toolsetmapsplugin&utm_campaign=toolsetmaps&utm_medium=views-integration-distance-filter&utm_term=our%20documentation#filtering-markers-by-distance
Is there a similar example that we can see?
No, I don't know of one, unfortunately.
What is the link to your site?
hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
To order the results by the distance from the searched location, the option 'As a distance from' should be selected, as shown in the attached screenshot.
Note: The URL parameter in the ordering settings and the query filter settings should be the same.
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Hi Waqar.
Thank you very much for your response.
However, I don't have the option to select 'As a distance from' as per your screenshot. That option is greyed out for me. See attached image.
You are likely correct that this is the the problem, but I can't fix it if I can't select that option.
Please help! Why would that be greyed out?
Jim
I have a staging site set up and the same thing occurs. I have deactivating plugins to see if there is a conflict. So far, no change but I haven't deactivated them all.
I turned on debugging in wp-config on and only got Notices such as:
Notice: Undefined index: meta_key in /home/955049.cloudwaysapps.com/aktkxrpugy/public_html/wp-content/plugins/toolset-maps/application/controllers/compatibility/gutenberg/editor-blocks/blocks/map/MapBlock.php on line 918
Notice: Undefined index: meta_key in /home/955049.cloudwaysapps.com/aktkxrpugy/public_html/wp-content/plugins/toolset-maps/includes/toolset-maps-shortcode-generator.php on line 844
These are just Notices so I don't think they are helpful.
Your help is greatly appreciated.
Jim
Hi again Waqar.
I think I figured out the issue. There was a discrepancy in the Custom Field slug of the Address.
This brings to light another issue though. My custom type is a Therapist, which people search for. There can be multiple Therapists at the same Business Address. On the map, only one Therapist will show at a specific location/address; they must be exactly overlapping..? Or is the first one replaced?
Is there a way around this? Can I show all of the Therapists at the location on the map?
In the included photo, both Therapists have the same address listed and only the second one will display on the map.
Jim
Thanks for the update and glad that the issue with the address custom field was sorted.
I've created a separate ticket for your new question and will follow up on that shortly.
( ref: https://toolset.com/forums/topic/split-map-results-with-the-same-location/ )
You're welcome to mark this ticket as resolved and start a new one for each new question or concern.
My issue is resolved now. Thank you!