]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
Update the links when the active layers change.
[rails.git] / app / views / site / index.rhtml
index e88643588d36d0b7255814c07cfa9d4ab4f789c3..27bcd618e34a1b173add177bc00cc469748f4341 100644 (file)
@@ -72,8 +72,8 @@ by the OpenStreetMap project and it's contributors.
 <% end %>
 <% end %>
 
-<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
-<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
+<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
+<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 
@@ -114,6 +114,7 @@ by the OpenStreetMap project and it's contributors.
     map.events.register("zoomend", map, updateKey);
 
     map.events.register("moveend", map, updateLocation);
+    map.events.register("changelayer", map, updateLocation);
     updateLocation();
 
     handleResize();