- <% if bbox %>
- var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);
+ <% unless object_zoom %>
+ <% if bbox %>
+ var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);
+
+ setMapExtent(bbox);
+
+ <% if box %>
+ // IE requires Vector layers be initialised on page load, and not under deferred script conditions
+ Event.observe(window, 'load', function() { addBoxToMap(bbox) });
+ <% end %>
+ <% else %>
+ var centre = new OpenLayers.LonLat(<%= lon %>, <%= lat %>);
+ var zoom = <%= zoom %>;