}
function updateMapKey() {
- var layer = map.baseLayer.name.toLowerCase().replace(/\s+/g, "_");
- var zoom = map.getZoom();
-
- <%= remote_function :update => "sidebar_content",
- :url => { :action => "key" },
- :with => "'layer=' + layer + '&zoom=' + zoom",
- :method => :get
- %>
+ $("#sidebar_content").load("<%= url_for :action => :key %>", {
+ layer: map.baseLayer.keyid,
+ zoom: map.getZoom()
+ });
}
</script>
<% content_for :left_menu do %>
- <%= link_to_function t('site.key.map_key'), "openMapKey()", :title => t('site.key.map_key_tooltip') %>
+ <li><%= link_to_function t('site.key.map_key'), "openMapKey()", :title => t('site.key.map_key_tooltip') %></li>
<% end %>