Apart from setting a cookie the first time round, is there a way of detecting whether a user has already given permission for navigator.geolocation to return the lat/long of
Please see this answer on how to do it using the Permissions API: Check if Geolocation was allowed and get Lat Lon
Works without prompting the user if permission was granted previously.