Navigation überspringen

[Gelöst] Show the closest location near me on the search result

This support ticket is created vor 1 year, 6 months. 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 -

Zeitzone des Unterstützers: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 2 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von Minesh vor 1 year, 6 months.

Assistiert von: Minesh.

Author
Artikel
#2786727
Capture.PNG

Tell us what you are trying to do?

I have custom post type (Clinics) and there is map showing all locations. On the search bar, I want to show the closest clinic near me on the search result when I search my location address. How can I achieve that?

Is there a similar example that we can see?

Check this example website: versteckter Link. When you search your locations, the nearest clinic will show.

What is the link to your site?

This is the development site I worked on: versteckter Link

#2786882

Anybody help me? PLS

#2786906

Minesh
Unterstützer

Sprachen: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

There is no such feature available to restrict the Google map address autocomplete to nearby places.

But you can add some custom code and achieve this, the following is for reference where the Google address autocomplete is restricted to specific country:
- https://toolset.com/forums/topic/split-change-placeholder-text-for-maps-fields-on-a-post-form-map-address-field-limit-to-specific-country-not-working/#post-2676494
- https://toolset.com/forums/topic/limiting-addresses-in-forms-via-js-disables-display-of-map-when-filling-out-form/#post-1856999

More info:
- https://stackoverflow.com/a/30089515