]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Don't set state if it doesn't exist
[rails.git] / app / assets / javascripts / index.js
index 5724eaae8c2cdde831d4ca4dcd42c5cf91a0e1ab..d612b27780109c50bcbbd5de8a7ccc95e993b4f5 100644 (file)
@@ -37,6 +37,7 @@
 
     $.ajax({
       url: path,
+      dataType: "html",
       complete: function(xhr) {
         clearTimeout(loaderTimeout);
         $('#sidebar_loader').hide();
@@ -231,7 +232,17 @@ $(document).ready(function () {
     page.load = function(path, type, id) {
       if (OSM.STATUS === 'api_offline' || OSM.STATUS === 'database_offline') return;
 
-      map.addObject({type: type, id: parseInt(id)}, {zoom: window.location.hash == ""});
+      map.addObject({type: type, id: parseInt(id)},
+        {
+          zoom: window.location.hash == "",
+          style: {
+            color: "#FF6200",
+            weight: 4,
+            opacity: 1,
+            fillOpacity: 0.5
+          }
+        }
+      );
     };
 
     page.unload = function() {