1 <script type="text/javascript">
2 function openMapKey() {
6 title: "<%= t('site.key.map_key') %>",
10 map.events.register("zoomend", map, updateMapKey);
11 map.events.register("changelayer", map, updateMapKey);
14 function closeMapKey() {
15 map.events.unregister("zoomend", map, updateMapKey);
16 map.events.unregister("changelayer", map, updateMapKey);
19 function updateMapKey() {
20 var layer = map.baseLayer.keyid;
21 var zoom = map.getZoom();
23 <%= remote_function :update => "sidebar_content",
24 :url => { :action => "key" },
25 :with => "'layer=' + layer + '&zoom=' + zoom",
31 <% content_for :left_menu do %>
32 <%= link_to_function t('site.key.map_key'), "openMapKey()", :title => t('site.key.map_key_tooltip') %>