bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
495 stars 235 forks source link

How to use callbackGeocodeRestrictions? #238

Closed TylerBarnes closed 6 years ago

TylerBarnes commented 6 years ago

Hi there, awesome plugin! The plugin does everything I need but I'm having one issue. I'm attempting to auto geolocate the user and display stores within the users state / province only. I think I should be using callbackGeocodeRestrictions but no matter what I return in the function it doesn't seem to apply any restrictions. The documentation mentions the geocoding restrictions object can be overwritten but it doesn't mention how to do this. Help would be hugely appreciated. Thanks

bjorn2404 commented 6 years ago

Please see Component Filtering documentation on Google for what properties should be defined in the override object. Documentation on how to use callbacks is provided and you just need to return the object in the callback function to override.

TylerBarnes commented 6 years ago

Hmm, I used both of those pages before asking the question but couldn't get it working. I'll give it another try this week.

Thanks @bjorn2404 !