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
Post a Comment