X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e657cff464b6db8384b56236ad9491223a22b1e2..ec1667fc093976cb9a69e5aba675ee4281d7ff64:/app/views/site/_key.html.erb diff --git a/app/views/site/_key.html.erb b/app/views/site/_key.html.erb index 22261900d..54bbca6a7 100644 --- a/app/views/site/_key.html.erb +++ b/app/views/site/_key.html.erb @@ -17,17 +17,13 @@ } 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() + }); } <% content_for :left_menu do %> - <%= link_to_function t('site.key.map_key'), "openMapKey()", :title => t('site.key.map_key_tooltip') %> +