javascript - Geolocation in Safari 9 always returning Position Unavailable -


i'm building app need user's location. have click event attached button, calls

navigator.geolocation.getcurrentposition(getvenues, handleerror); 

this works expected on chrome , firefox, , getvenues function run after grant access location. on safari, after granting access handleerror function called.

this happens on both local , production server, both of use https. computer on wifi connection. safari version 9.1.2 (11601.7.7). have looked through of other posts related geolocation in safari , none of solutions have worked far.

i have tried passing options getcurrentposition increase timeout , maximumage no luck.

here's full code example:

$("#nearby-find").on('click', function() {   navigator.geolocation.getcurrentposition(getvenues, handleerror); });  var getvenues = function(position) {   console.log(position); };  var handleerror = function(error) {   console.log(error); } 

clicking button initiates geolocation access request after clicking accept handleerror function called error code of 2 (position unavailable).

are there other issues/bugs/gotchas safari geolocation need check?


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -