Recognise locations in the hash correctly
authorTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 09:23:51 +0000 (10:23 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 09:23:51 +0000 (10:23 +0100)
app/assets/javascripts/osm.js.erb

index 409cda8..e414d26 100644 (file)
@@ -75,7 +75,7 @@ OSM = {
     var hash = OSM.parseHash(location.hash);
 
     // Decide on a map starting position. Various ways of doing this.
-    if (hash.lat && hash.lon) {
+    if (hash.center) {
       mapParams.lon = hash.center.lng;
       mapParams.lat = hash.center.lat;
       mapParams.zoom = hash.zoom;