1 <script type="text/javascript">
2 $(document).ready(function () {
3 var updateMapKey = function () {
4 $("#sidebar_content").load("<%= url_for :action => :key %>", {
5 layer: map.baseLayer.keyid,
10 var closeMapKey = function () {
11 map.events.unregister("zoomend", map, updateMapKey);
12 map.events.unregister("changelayer", map, updateMapKey);
15 $("#open_map_key").click(function () {
19 title: "<%= t('site.key.map_key') %>",
23 map.events.register("zoomend", map, updateMapKey);
24 map.events.register("changelayer", map, updateMapKey);
29 <% content_for :left_menu do %>
30 <li><%= link_to t("site.key.map_key"), "#", :id => "open_map_key", :title => t("site.key.map_key_tooltip") %></li>