Cleaned up, added another error

master
Keith Irwin 2017-08-07 18:03:15 -04:00
parent bd92d4b74c
commit 89bf0b6416
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
1 changed files with 6 additions and 4 deletions

View File

@ -85,11 +85,13 @@ function updateStreetView(loc){
}
// Track GPS location
// Check for geolocation
if (!navigator.geolocation){
alert("Geolocation not available!");
}
else { navigator.geolocation.watchPosition(
} else {
// Track geolocation
navigator.geolocation.watchPosition(
// Got location
function(pos) {
@ -105,7 +107,7 @@ else { navigator.geolocation.watchPosition(
// Got error
function() {
//TODO: Show error
alert("No geolocation position available!");
},
// Options