+ 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({ width: "210px" });
+ }
+
+ function updateKey() {
+ if (sidebarOpen("Map key"))
+ {
+ showKey();
+ }