Closed oferb closed 4 years ago
Thanks @benjamingr! Problem is, we don't ask in advance location permission, only when the user presses the "zoom to my location" button. The reason is that we don't need that location until that button is pressed, and don't want to bother the user with that.
So if we add the button on desktop, what might happen is that the user will get an inaccurate location. So to prevent that entirely, we don't show on desktop.
Happy to hear your thoughts.
So if we add the button on desktop, what might happen is that the user will get an inaccurate location. So to prevent that entirely, we don't show on desktop.
I don't think there is a way to know ahead of time if getCurrentPosition will return an accurate location - so that sounds reasonable.
we fix it by removing the current location on the desktop. closing.
Hey, here https://github.com/oferb/israelcoronamap/blob/master/public/js/app.js#L22 you can pass
enableHighAccuracy: true
and check You can check the.accuracy
parameter on the result. It's not documented in GitHub but it's part of the spec.