I recently created a website that utilizes the Google Geolocation JavaScript API along with the vue2-google-maps package. Here is a snippet of the relevant code:
`geolocate () {
var self = this
this.loading = true
navigator.geolocation.getCurrentPosition(position => {
this.loading = true
this.center = {
lat: position.coords.latitude,
lng: position.coords.longitude
}
}`
One issue I've encountered is when a user first opens the page on a MOBILE browser and denies access to their location, the browser seems to remember this preference. Subsequently, upon refreshing the page, the pop-up window asking for permission to share location does not reappear.
Is there a way to ensure that the pop-up window appears on every refresh?
I have attempted to clear the browsing data (i.e., navigating to settings -> webpage settings -> location -> my site) but even after accepting the prompt again, the browser saves the response behind the scenes. Consequently, by the third refresh, the pop-up window fails to appear once more :(