Geolocation with Html5

Asked

Viewed 201 times

1

I need to capture the user’s location the moment he opens my page. When performing tests by means of a button that calls the function getLocation() containing the commands to perform the capture of the information I need, I found a problem when viewing that at the moment I access the site by a mobile browser on android, It only asks for permission to collect location data if the user’s mobile gps is turned on, otherwise it cannot perform my function. The problem is that no one nowadays has active location due to high battery consumption. Would there be some way I could turn on the person’s gps or some other way to pick up the location in the browser by android?

  • Turning on the GPS alone is impossible. You would have to warn the user that the GPS needs to be turned on. link if it helps.

  • Opa, thanks Douglas, I will take the idea of one of the comments of the post you put here, displaying an alert in the error callback, is the same but thanks for the help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.