url += "/full";
<% end %>
- addObjectToMap(url, <%= object_zoom %>);
+ // IE requires Vector layers be initialised on page load, and not under deferred script conditions
+ Event.observe(window, 'load', function() { addObjectToMap(url, <%= object_zoom %>) });
<% end %>
map.events.register("moveend", map, updateLocation);
function toggleData() {
if (map.dataLayer.visibility) {
<%= remote_function :url => { :controller => 'browse', :action => 'start' } %>
- } else {
+ } else if (map.dataLayer.active) {
closeSidebar();
}
}
return getMapCenter();
}
+ function getZoom() {
+ return getMapZoom();
+ }
+
function setPosition(lat, lon, zoom, min_lon, min_lat, max_lon, max_lat) {
var centre = new OpenLayers.LonLat(lon, lat);