在Safari中,当我们允许该位置时,它不会捕获该位置的经度和纬度。这是在Firefox和Chrome浏览器上正常运行的代码
var that = this;
navigator.geolocation.getCurrentPosition(function(position) {
that.latitude = position.coords.latitude;
that.longitude = position.coords.longitude;
if (localStorage.getItem("loactionAllow") != null) {
localStorage.removeItem("loactionAllow");
}
});