Saltar navegación

[Resuelto] OpenStreetMap Requires Google Maps API for Distance Filter

This support ticket is created hace 1 mes. 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)

Este tema contiene 7 respuestas, tiene 1 mensaje.

Última actualización por Minesh hace 2 semanas, 3 días.

Asistido por: Minesh.

Autor
Mensajes
#2808351

My site has a distance filter that was using Google Maps API (searching within a radius of X miles from user location), after updating all Toolset plugins I removed the Google Maps API from my Toolset settings and switched to OpenStreetMap. This caused the search filter to disappear, though maps displayed correctly. Reverting back to Google Maps and restoring the API fixed the issue. Further testing showed that the search distance filter works with OpenStreetMap only if the Google Maps API remains in place

Could you look into this? Thanks!

#2808488

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi,

Welcome to Toolset support. Would you please test if the same thing happens on the clean installation below?

If so, I will report this to the development team for further investigation:

enlace oculto

Thanks.

#2808852

It seems rather involved to have to create a whole new setup of views, templates, profiles and custom search on a new install. Doing so on my own site took quite some time. Is there another way to go about this?

In addition, putting any number in the Google Maps API (for example 00000000000000000000) gets the search bar displayed when set to Openstreetmap

#2808912

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi,

Thank you. I imported one of our pre-configured data:

enlace oculto

Would you please check if you can add a distance filter either here:
enlace oculto

Or add a new page to add the filter.

The Tour Field Group contains the address fields and there are a few entries available for testing.

Thanks.

#2809532

I'm having some trouble setting up a distance filter at the sandbox url provided. It's been some time since I had to set this up and I thought it was simply choosing Distance as part of the Custom Search filter on the frontend with Blocks but that doesn't seem to be the case. Is it not possible via Blocks the way the rest of the page would be setup? I dont want to make a mess of things on the backend is there an up to date video or tutorial specific to setting up search by distance?

#2809563

Christopher Amirian
Colaborador

Idiomas: Inglés (English )

Hi,

You can use this as a reference:

https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

But you are welcome to create a legacy view if it is something you are more comfortable with:

- Go to "Toolset > Settings > General".
- Find the "Editing experience" section.
- Check the "Show both the legacy and Blocks interface and let me choose which to use for each item I build" checkbox.
- Reload the browser page.
- Go to the newly added "Toolset > Views" menu.
- There you will be able to edit the views.

For more information:
https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

#2810488
shortcode.png
no-filter2.png
no-filter1.png

Using the Filtering Markers by Distance instructions on the aforementioned page at https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance
To edit the following page: enlace oculto
I selected View block and added Address custom search filter.
With the View block selected, on the right side of the page I clicked Content Selection (not specified in the instructions and should be updated) to drop down the Query Filter, I then clicked the Add Filter button but there was no option for Distance. See attached images. Did I miss a step? These seems to be the way I achieved it on my website, when I checked the View Content Selection I am utilizing a Distance query filter on my site

Using the Displaying a distance between two locations instructions on the aforementioned page at https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance
To edit the following page: enlace oculto
A shortcode was added but it doesnt display anything. See attached image

#2810533

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Christopher pass this ticket to me and I'll take care of it and try to help you further. Hope this is OK.

Regaring the sandbox site, I've added the distance search field:
- enlace oculto

But the original query which you have:

My site has a distance filter that was using Google Maps API (searching within a radius of X miles from user location), after updating all Toolset plugins I removed the Google Maps API from my Toolset settings and switched to OpenStreetMap. This caused the search filter to disappear,

What you see is the expected results as OpenStreetMaps does not support geolocation-based distance filters (e.g., within X km of an address).

For address search, you will have to use the Google API key.