Increase the accuracy of the user's geolocation (no Google Maps API)

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!

2 Likes

Hi,
I’m doing something different but I’m having similar problem with Google Chrome on the accuracy. Any help in how to improve this accuracy will be great!

the problem with the error is that it is dynamic, If it was static my be could be adjusted with adding or subtracting some values! my accuracy is way off almost 20 km?! but just wondering, why is google accurate at pinpointing my location and not my browser, while the initial data is the the same, there must be some alogo, behind google’s accuracy, possible solution for know is calling a google API! and get location from there, rather than the pc!