bjorn2404 / jQuery-Store-Locator-Plugin

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

No results when using browser geo-location with maxDistance = true #98

Closed joesparacio closed 8 years ago

joesparacio commented 8 years ago

We just added a hidden input field with id="bh-sl-maxdistance" and a value of 75. For certain product categories, we are setting maxDistance to "true" to limit the results. This works fine when you manually enter an address, city, state, or ZIP code, but always returns zero results if you let the browser detect your location (see below).

Using browser geo-location:

screen shot 2016-02-02 at 8 16 19 am

Using ZIP code 90040:

screen shot 2016-02-02 at 8 16 46 am

Any thoughts?

joesparacio commented 8 years ago

UPDATE: We installed the latest version of Handlebars and your plugin, and we are now getting results when autoGeocode is set to true, but the maxDistance limit is not applied. It looks like you are only checking this value on form submit. Is it possible to initialize the locator with a maxDistance value so it works with autoGeocode?

bjorn2404 commented 8 years ago

Hi, sorry for the delay. There currently isn't a way to handle that with the plugin.

bjorn2404 commented 8 years ago

This issue has been addressed in v2.5.3