Search code examples
leafletgeolocationgis

Leaflet Geolocation in my own app not very accurate on iPhone until I turn on Google Maps or Apple Maps


I developed my own app using the Leaflet tutorial here: https://leafletjs.com/examples/mobile/

When I go outside and test on my iPhone in Safari I get accuracy of +-40 meters, which is not good enough. The marker jumps around quite a bit. However, when I open Google Maps or Apple Maps and then go back to my leaflet app in Safari the accuracy is much better in my leaflet app. Is there something that Google Maps or Apple Maps is triggering on my phone that I don't have in my leaflet app?


Solution

  • I don't have an answer for you but I do have the same question. Is it possible that Google/Apple use GPS and Leaflet uses GSM? That's the only thing I can think of that would cause such radically different experiences using the same device.

    [https://placesense.ai/why-gps-is-streets-ahead-of-gsm-for-location-based-analytics/][1]