HTML 5 Geolocation not working with Directions API
问题 I am trying to use the geolocations API with the Directions service but I get: var UserLoc; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat=position.coords.latitude; var lng=position.coords.longitude; console.log(lat); console.log(lng); UserLoc = new google.maps.LatLng(lat,lng); var NewMarker = new google.maps.Marker({ position: UserLoc, draggable: false, animation: google.maps.Animation.DROP, map: SEVTmap }); } ); } else { alert ( "Възникна