<div id="map">
- <div id="potlatch"><%= t 'site.edit.flash_player_required' %></div>
+ <div id="potlatch"><%= raw t 'site.edit.flash_player_required' %></div>
</div>
<%= javascript_include_tag 'swfobject.js' %>
<% locale = request.compatible_language_from(Potlatch2::LOCALES.keys) || "en" %>
<script type="text/javascript" defer="defer">
- var brokenContentSize = $("content").offsetWidth == 0;
var changesaved=true;
window.onbeforeunload=function() {
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").setPosition(lat, lon, Math.max(zoom || 15, 13));
+ $("#potlatch").each(function () {
+ this.setPosition(lat, lon, Math.max(zoom || 15, 13));
+ });
}
function mapMoved(lon, lat, zoom, minlon, minlat, maxlon, maxlat) {