Closed barbeau closed 8 years ago
I think this is happening because since disabling the Locate button code to only use our local geolocate callbacks, it would not have much to do once enabled unless the user actually moves (thus triggering the callback). There may be another issue that is preventing the appropriate style from cycling upon subsequent clicks (the icon should go between black and blue which corresponds to toggling the 'follow me' functionality) which seems to not work on chrome. This does seem to still work on FF for me.
To mitigate the 'nothing happens' issue, we can add the following to the L.Locate start method:
if (webapp.map.currentLocation != false)
webapp.map.lmap.panTo( webapp.map.currentLocation.latlng );
Which will pan the map back to the last location whenever the button is clicked (and should be 'activated').
Need some additional testing, but this might be enough for now.
On Chrome on my laptop from home.
Steps to reproduce:
What I see:
What I expect:
@jmfield2 Could you please take a look at this? Should be top priority as it seems broken on production. Thanks!