]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_potlatch2.html.erb
Set required Flash version to 10.1.x per request of RichardF
[rails.git] / app / views / site / _potlatch2.html.erb
index e7a2564f916eb97118ffba9433147f9f752b2b7a..0b1c0e34d5d8506576644807f48188df866b8197 100644 (file)
     attributes.id = "potlatch";
     attributes.bgcolor = "#FFFFFF";
 
-    swfobject.embedSWF("<%= asset_path("/potlatch2/potlatch2.swf") %>", "potlatch", "100%", "100%", "10.1.85","<%= asset_path("expressInstall.swf") %>", flashvars, params, attributes);
+    swfobject.embedSWF("<%= asset_path("/potlatch2/potlatch2.swf") %>", "potlatch", "100%", "100%", "10.1.102","<%= asset_path("expressInstall.swf") %>", flashvars, params, attributes);
     // 700,600 for fixed size, 100%,100% for resizable
   }
 
+  <% if params[:node] -%>
+  <% bbox = Node.find(params[:node]).bbox.to_unscaled -%>
+  doSWF(<%= bbox.centre_lat %>,<%= bbox.centre_lon %>,16);
+  <% elsif params[:way] -%>
+  <% bbox = Way.find(params[:way]).bbox.to_unscaled -%>
+  doSWF(<%= bbox.centre_lat %>,<%= bbox.centre_lon %>,16);
+  <% else -%>
   doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
+  <% end -%>
 
   function setPosition(lat, lon, zoom) {
     $("#potlatch").each(function () {