]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_key.rhtml
Back out attempt to commit partial support for POIs as this is not at
[rails.git] / app / views / site / _key.rhtml
index 54ec829096681301d7ff41242e990d43d14be82c..c6b6fe29a5912448f020c3a07dcb63cf5de60a7f 100644 (file)
@@ -5,12 +5,21 @@
 <script type="text/javascript">
 <!--
   function showKey() {
-       var zoomlevel=map.getZoom();
-       if      (zoomlevel<7 ) { var imgname='keymapnik6.png'; }
-       else if (zoomlevel<12) { var imgname='keymapnik'+zoomlevel+'.png'; }
-       else                   { var imgname='keymapnik12.png'; }
+    var zoomlevel = map.getZoom();
+
+    if (zoomlevel<7 )      { var imgname = 'keymapnik6.png'; }
+    else if (zoomlevel<13) { var imgname = 'keymapnik'+zoomlevel+'.png'; }
+    else                   { var imgname = 'keymapnik13.png'; }
+
     updateSidebar("Map key", "<p><img src='images/"+imgname+"' /></p>");
     openSidebar("210px");
   }
+
+  function updateKey() {
+    if (sidebarOpen("Map key")) 
+    {
+      showKey();
+    }
+  }
 // -->
 </script>