From bd92d4b74cb879b48d058454efc598448d04b32b Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Mon, 7 Aug 2017 18:01:12 -0400 Subject: [PATCH] Added a simple error message --- script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 7e2f53f..cc8095b 100644 --- a/script.js +++ b/script.js @@ -86,7 +86,9 @@ function updateStreetView(loc){ } // Track GPS location -if (!navigator.geolocation){ /* Show error */ } +if (!navigator.geolocation){ + alert("Geolocation not available!"); +} else { navigator.geolocation.watchPosition( // Got location