Cleaned up, added another error
parent
bd92d4b74c
commit
89bf0b6416
10
script.js
10
script.js
|
@ -85,11 +85,13 @@ function updateStreetView(loc){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track GPS location
|
// Check for geolocation
|
||||||
if (!navigator.geolocation){
|
if (!navigator.geolocation){
|
||||||
alert("Geolocation not available!");
|
alert("Geolocation not available!");
|
||||||
}
|
} else {
|
||||||
else { navigator.geolocation.watchPosition(
|
|
||||||
|
// Track geolocation
|
||||||
|
navigator.geolocation.watchPosition(
|
||||||
|
|
||||||
// Got location
|
// Got location
|
||||||
function(pos) {
|
function(pos) {
|
||||||
|
@ -105,7 +107,7 @@ else { navigator.geolocation.watchPosition(
|
||||||
|
|
||||||
// Got error
|
// Got error
|
||||||
function() {
|
function() {
|
||||||
//TODO: Show error
|
alert("No geolocation position available!");
|
||||||
},
|
},
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
|
|
Loading…
Reference in New Issue