Location information acquisition applications developed on Iphone and Android devices were displayed in a web browser.
It wanted to acquire location information implemented with the Geolocation API, but it always returned an error and could not be acquired.
We investigated when GPS information cannot be obtained from the Geolocation API.
Location-based services are switched off.
If the location services are switched off in the open browser, they will always be unavailable.
Turn on location services in the settings of your device and reload your browser. It will then work.
Location access permission dialogue not displayed
When attempting to obtain location information from the Geolocation API, a confirmation dialogue is displayed with regard to sites that are not permitted.
If you click [Do not allow] more than once here, the dialogue may not be displayed for the same site thereafter.
In this case, go to [Settings] – [General] – [Reset] – [Reset location and privacy] and initialise.
This often fixes the problem, but you should be aware that the location settings of all apps will be reset and you will have to reconfigure them.
Check protocol.
Location information cannot be obtained when the protocol being accessed by the browser is ‘http’.
Location information, as well as name and address, is privacy information and is likely to be leaked to third parties over http connections, so it is likely to be controlled by the security of the browser itself.
Personal and privacy information should be communicated securely over https.
Summary
Location acquisition seems to be better implemented with an understanding of the three relationships between the program, the OS and the browser.