K
K
Kirill Gorlov2015-09-04 13:30:40
JavaScript
Kirill Gorlov, 2015-09-04 13:30:40

Firefox and GEO location, how to handle "not now" event when geo-positioning client?

We are developing a service for ordering a taxi, and faced such a problem.
It is necessary to determine the user's location, or load the default data, depending on the city selected in the interface.
Everything works fine in Google Cgrome. There are two buttons "Allow" and "Block" - the browser adequately responds to this, even if I click on the cross, i.e. I will not answer the browser - the default data will be loaded.
In FireFox, things are different. There is "Always report the location", "Never report the location" and they are also adequately processed by the script, BUT just press "Not now" and the application goes into a stupor because it still waits for a response from the user, adequate.
It makes no sense to set a timer for the event, since the user can open the page and not allow himself to be positioned after half an hour of thought, or vice versa, allow the service to start from the desired point on the map.
Duck here - how can I catch the "Not now" click event on a coordinate request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Gorlov, 2015-09-04
@Chetson

In general, if anyone encounters such a problem, a solution has been developed.
1 - set coordinates by default initially
2 - request coordinates from the user
3.1 - if the user does not give anything, leave it as it is
3.2 - if the user gives coordinates - update the map, find it and move away from it
For Firefox, who clicked "not now" there will be default coordinates anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question