X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/17a7c69e8dfefb5dda2a9f57d6ea3c879d4568f4..79276fb43abc429cd5515f81005281e303a16dd8:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 0602b6f11..ddd66a861 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -125,7 +125,7 @@ end function mapInit(){ map = createMap("map"); - <% unless OSM_STATUS == :api_offline or OSM_STATUS == :database_offline %> + <% unless STATUS == :api_offline or STATUS == :database_offline %> map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", { "visibility": false }); map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData); map.addLayer(map.dataLayer); @@ -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);