javascript - ios html5 geolocation - no error when browser has no rights to use geolocation -


when using html5 geolocation, works nicely in computer browser, after switching iphone no error when user has phone settings set not allow browser use geolocation, there way trigger error in such situation? navigator.geolocation.getcurrentposition(handlesuccess, handleerror) i'm using code current position , handleerror never triggered

did try validate object navigator.geolocation ?

function getlocation() {     if (navigator.geolocation) {         navigator.geolocation.getcurrentposition(showposition);     } else {         throw "geolocation not supported browser.";     } } function showposition() {     // code } getlocation(); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -