I'm currently working on a drupal site to show a page/node that displays a location and the current user's proximity/distance to that location, along with a map showing the location and the user's location.
All the elements are on a Panel using Views and IPGV&M (IP Geolocation Views & Maps) to obtain the proximity to the geofield holding the coordinates to the location.
Everything is configured and the IPGV&M module has a block called “Set My Location”, which finds the user’s location via their mobile GPS/HTML5 geolocation.
The “Find Me” button in the IPVG&M module needs to be clicked more than once in order to find the user, instead of just once when using a mobile phone since the location can change when walking. Seems to work ok on desktop since location is the same.
When clicked once, a past location is shown with a bad/high accuracy (600+ meters) – whether it’s the previous location found or a historical location when logged in. On the second click, for the most part, the correct location is shown with a good accuracy (under 50 meters).
- Issue may be linked to the page refreshing and loading before the new location is captured.
- Issue may be linked to the new location not replacing session table info on the first click.
The main JS file doing the location search is [login to view URL]
1. To have the process/function load twice right after another before the page reloads.
2. Have the page continuously search for location and load/refresh only if results accuracy is 50 or less.