Unfortunately I am having problems with the getCurrentGeolocation () function as it does not return a fairly precise geolocation on certain browsers. For example using Safari browser i can get the precise geolocation, using Chrome I can’t.
To contextualize the project:
I created a collection of geolocated items ( with latitude and longitude coordinates) . Users “A” can add item to this collection using their current location (I used getCurrentGeolocation () function).
Now I am creating a search function within this collection to show the closest items to the user “B” (who is searching these items). To calculating the distance on every item i’m using the formula to find the linear distance between to points on the Earth. But i n order to correctly carry out this calculations I must have good geolocation accuracy (error approximately ±10m).
I’m looking for a solution everywhere but I haven’t found it yet. Any suggestions?
Thanks in advance!