0

When I am in Firefox and go to Esri's example at LocatorWidget and add useTracking: true to the geoLocate definition e.g.

  geoLocate = new LocateButton({
    map: map,
    useTracking: true
  }, "LocateButton");
  geoLocate.startup();

and click on the locator widget I zoom to my location as expected. But if I move the map in any way, Firefox zooms me back to the user location, even if I have toggled the locator widget to not track. IE and Chrome do not behave this way.

  • Why was this voted down? – ponder275 May 9 '18 at 20:10
1

This seems to be due to how different browsers implement https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition

In a typical "wired" desktop situation, Chrome/IE/Edge only return one single position, while Firefox returns multiple (even if it hasn't changed).

If you switch to for example using the internet via a cellphone connection, all browsers seem to return multiple locations.

  • This makes sense since I have found the same problem when people run the code on their phone browsers. – ponder275 May 15 '18 at 1:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.