Wait for the page to finish loading before trying to add any data

object to the map as IE won't be ready to draw vectors until the
page is fully loaded. Closes #2692.
This commit is contained in:
Tom Hughes 2010-02-26 14:46:02 +00:00
parent aac4776dd1
commit dfec61084a

View file

@ -170,7 +170,8 @@ end
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);