Skip Navigation

[Resolved] Limiting maps results

This support ticket is created 5 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 3 voices.

Last updated by rubenB 5 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1204992
example.png

Tell us what you are trying to do?
Hi there I'm trying to limit the results displayed by the distance search to just the UK. but wasn't sure if it was possible or how to go about it.

Is there any documentation that you are following?
hidden link

Is there a similar example that we can see?
https://stackoverflow.com/questions/8282026/how-to-limit-google-autocomplete-results-to-city-and-country-only

What is the link to your site?
hidden link

#1205393

Hi Matthew,

Thank you for contacting us and I'll be happy to assist.

To make sure that the results in the distance search field are restricted to "UK" only, you can include the following code in your View's "JS editor" tab, under the "Loop Editor" section:


jQuery(".js-toolset-maps-distance-center").geocomplete({country: 'UK',type: []});

Note: If you'd like this feature to be available in the Toolset plugin, out-of-the-box, you're welcome to submit this as a feature request through the form at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

I hope this helps.

regards,
Waqar

#1205889

My issue is resolved now. Thank you!

#1352291

Thanks!

This is nice and easy solution.

BTW here are country codes that can be used in place of "UK"
hidden link