HTML5 Geolocation, ask for a location?

Can I request user permission to get my location on demand? It is usually requested when the page requests a location, for example navigator.geolocation , but will not ask again until the page reloads and the script again asks for a place.

Is there a way to ask on demand, for example) after the user hit?

+5
source share
1 answer

You need to either request a location from another domain, or provide instructions on how to enter your browser and change their settings. Like on the iPhone, how do you need to go into settings if you accidentally reject permission.

This is because the permission request is actually implemented based on the browser. You can imagine if geolocation was in IE6 days, IE6 would automatically accept it. Your decision should be based on the browser that someone is using.

+3
source

All Articles