internet explorer - This website does not have permission to use the Geolocation API -
i expericing error, while trying use geolocation api:
this website not have permission use geolocation api
the strange thing same website running fine on 1 systems(where ie.9 , i.e10 installed) , throws error on system i.e 9 installed.
we tested on different systems throws error on particular system i.e9 installed.
- do need browser settings use api?
- what persmission require our website, use geolocation api?
code:
function geolocateuser() { // if browser supports geolocation api if (navigator.geolocation) { navigator.geolocation.getcurrentposition(geolocationsuccess, geolocationerror); } else { alert("your browser doesn't support geolocation api"); } }
in case of success:
function geolocationsuccess(position) { var usercurrentlatlong = new google.maps.latlng(position.coords.latitude, position.coords.longitude); }
in case of error:
function geolocationerror(positionerror) { alert(positionerror.message + "\n" + "you redirected default location."); }
this windows setting, @ least in case. try going settings (search start menu in windows) > privacy > location , turn location = on.
Comments
Post a Comment