Skip Navigation

[Resolved] I can't seem to get the distance filter to work

This support ticket is created 4 years, 2 months 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 5 replies, has 4 voices.

Last updated by robertC-18 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1794713

Tell us what you are trying to do? I am trying to automatically filter the posts to only show items within a 5 mile radius of Royal Oak, MI, USA.

Is there any documentation that you are following? I have been following this one, as well as others: https://toolset.com/course-lesson/displaying-a-list-of-posts-on-a-map/

Is there a similar example that we can see? This one is working fine but it's the general one that's not filtering by location: hidden link

What is the link to your site? This is the page with the view, filter, & map that I cannot get to work: hidden link

I must be missing something simple here.

#1795265

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I think it would help to be able to see what you've done on that page, can we get access?

Let me set a private reply so you can share site credentials.

You may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

#1795279
by-location.JPG

Hello,

I have checked the URL you mentioned above, the first one works fine, for example:
hidden link

See my screenshot: by-location.JPG

The second one:
hidden link
There isn't any map marker in the map at all.

And I have checked the HTML source codes of above page, you are using id "map-7" for map shortcode, but all marker shortcode is using map ID "map-7-1", so it will conduct the problem, please try to find and edit the map shortcode, setup the map ID attribute "map_id" as "map-7-1", and test again.

More help:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render

#1796791

Hi there, just following up on my previous message. I did try what you suggested (changing the map ID to map-7-1) but that didn't work. And I sent over my login information yesterday. Please let me know if there's anything else I can try. Thanks!

#1799865

Hi,

Thank you for waiting and for sharing the admin access.

Luo is on vacation, so I'll be following up on this ticket.

During troubleshooting, I noticed that in the view "Portfolio Filter with Map - Royal Oak", the distance query filter was incorrectly set to use the coordinates in the "Distance center is set using URL parameter" option.

I've set this to "Distance center is set using a fixed location" option with reference to "Royal Oak, MI, USA" and the results are now being filtered correctly.
( screenshot: hidden link )

As for the issue of map markers not showing correctly on the map, I couldn't reproduce this issue on my test website, with the latest Toolset plugins and Divi theme.

To troubleshoot this, I'll suggest the following steps:

1. Please make sure that WordPress, active theme, and plugins are all updated to the latest versions.

2. It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty.

If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

3. In case the issue still persists, I'll need a clone/snapshot of the website so that it can be investigated on a different server.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

Please let me know how it goes and I've set your next reply as private.

regards,
Waqar

#1800841

Looks like there was a conflict with the slideshow I was using on that page, which is what made the map not function correctly. My issue is resolved now. Thank you!