Closest Location Feature
The Closest Location feature allows you to have the map adjust to the closest location from your user's location.
Here is how it works:
1. When you first load the map, you are getting your regular default settings to display.
2. Shortly after the page loads, the browser will display a grant access pop-up (built into the browser) if the user allows you access to their location information.
(Note: This is a user privacy issue and there is no way to force this permission.)
3. The map will auto zoom to the location and display the closest options.
So in my case, since I live in Assonet, MA (USA). The map, after a couple seconds, will reposition to US and display the nearest options based on my location at the same zoom set in the default settings.
The results will show the map centered based on my location.
The way this is enabled is under the map options settings. We also added the allow mouse wheel features to be disabled, which further improves the user experience.
Please feel free to test this on the live demo to see how the feature works.
Note: To test this you will need to refresh the map by reloading your browser. As the Browser refreshes the pop-up will appear.