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 $("#sidebar_content").load("<%= url_for :action => :key %>", {
21 layer: map.baseLayer.keyid,
27 <% content_for :left_menu do %>
28 <li><%= link_to_function t('site.key.map_key'), "openMapKey()", :title => t('site.key.map_key_tooltip') %></li>