<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() {
// 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) {