Skip Navigation

[Resolved] Restrict the Google Maps API in Toolset search filter

This support ticket is created 3 years, 8 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 3 voices.

Last updated by Florys 3 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1727189

Hi,

We are using Google Maps with the Toolset location filter. Is it possible to restrict the Toolset Google Maps API to one country?

#1727523

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Richard,

Thank you for getting in touch.

Unfortunately no this is not possible to do with the API. I assume that you only want to allow users of a specific location to access the search filters correct?

Please let me know.
Thanks,
Shane

#1727835
Naamloos.png

Hi Shane,

Thanks for your response! I added an image which response the issue.

We only want cities from the Netherlands in the search filter.

For example, search for Groningen

We get US, Spain, Austria and France. Can we remove all these countries?

Thank you!

#1728445

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Florys,

Given that this is not a native functionality in our Toolset Maps plugin you will need to use the custom code from the Google API to achieve this.

An example can be see below.
hidden link

However if you're not sure how to implement this on your own site then I would highly recommend that you get in touch with a developer that can integrate this onto your site.

We have a list of developers that have registered with us and you can contact them by going to the link below.
https://toolset.com/contractors/

Thanks,
Shane

#1729171

Hi Shane,

I found this earlier post > https://toolset.com/forums/topic/google-places-limit-autocomplete-results-to-cities-only-hints/page/2/

When I changed the jquery.geocomplete.min.js file the filter gives only results from one country!

#1729921

Hi, Shane is out today on a public holiday and will return tomorrow to continue assisting you. Thanks for your patience.

#1731045

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Florys,

Happy that you were able to find this article from our forums.

Is it working for you as intended? It should also be noted that we don't support custom code even from our supporters, however if its not working as intended I can have a quick look and see what I can do.

Thanks,
Shane

#1732841

Hi Shane,

For now it's working fine! Thanks for support!

#1732843

.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.