X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/50fafa14f86a9ff02458c1e055f24c199f14a8eb..e3de1c457205e281fcae31e42fd8651b37a4c214:/app/views/site/_potlatch2.html.erb?ds=sidebyside diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index bb811d652..3aeafa9cf 100644 --- a/app/views/site/_potlatch2.html.erb +++ b/app/views/site/_potlatch2.html.erb @@ -70,22 +70,12 @@ } } +<% if @lat && @lon -%> + doSWF(<%= @lat %>, <%= @lon %>, <%= @zoom %>); +<% else -%> var mapParams = OSM.mapParams(); - <% if @lat && @lon -%> - doSWF(<%= @lat %>, <%= @lon %>, mapParams.zoom || <%= @zoom %>); - <% else -%> - doSWF(mapParams.lat, mapParams.lon, mapParams.zoom || 17); - <% end -%> - - $("body").on("click", "a.set_position", function (e) { - e.preventDefault(); - - var data = $(this).data(); - - $("#potlatch").each(function () { - this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13)); - }); - }); + doSWF(mapParams.lat, mapParams.lon, mapParams.zoom || 17); +<% end -%> var mapMoved = $.throttle(250, function(lon, lat, zoom) { updateLinks({ lon: lon, lat: lat }, zoom);