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){ 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