-<!--
- function showKey() {
- var zoomlevel = map.getZoom();
-
- if (zoomlevel<7 ) { var imgname = 'keymapnik6.png'; }
- else if (zoomlevel<13) { var imgname = 'keymapnik'+zoomlevel+'.png'; }
- else if (zoomlevel<15) { var imgname = 'keymapnik13.png'; }
- else { var imgname = 'keymapnik15.png'; }
-
- updateSidebar("<%= t('site.key.map_key') %>", "<p><img src='images/"+imgname+"' /><\/p>");
- openSidebar({ width: "210px" });
+$(document).ready(function () {
+ var updateMapKey = function () {
+ $("#sidebar_content").load("<%= url_for :action => :key %>", {
+ layer: map.baseLayer.keyid,
+ zoom: map.getZoom()
+ });