Forum Academy Marketplace Showcase Pricing Features

Ask permission for location on page load?

Hi @AlexDaresTo did you find any solution? I am having a similar issue. I am using google maps to display static maps of various places. The request for permission to access the user’s location comes up, but I am not asking for the user’s geographic location nor do I need it for any functionality on the map or in my app.

Hi @leonidas.petrou4 and everybody
I’ve a similar issue 95 times out of 100 the user does not give consent to use their location immediately once they arrive on the site via the browser popup, cause they don’t know the site and they don’t trust it initially.

From real user test it appears that after not allowing the sharing of their location, the users take a look at the site, evaluate that it is reliable and then click on “find my location” which is a backup solution that try to locate the user via IP system and 100% of the times gives them a position far from where they are, at that point they leave the site because they do not consider it reliable.

What you’ve proposed, so prompt back the Allow permission after clicking a button, seems the best option.

Did someone know how to structure the workflow to do that?

Thank you!

So i was researching and there is no way for the browser popup to show again if you want to pronpt the user to allow locatiion. but you can detect when the location is empty or lat & lon is 0 and show a mini popup to instruct the user to allow location.

Usually they have to click the location icon in the url bar for desktops and select allow location for this site.
and mobile (at least android) you click the padlock icon inn the url bar and select permissions and click the on button for location.

Hi Akiempaul, you’re totally right, it seems impossible.
In the end what we did is to postpone the request for the position,
giving the user the opportunity to take a look at the app before.
when he will decide he can click on a button and share his position.

Thank you!