X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/639a994c9b851b94d4c65aa96af732eefc8453fb..ae8c0b3baff821423ef4830abab075ffb8f4ead9:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 150bdce4d..636e6929c 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -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); @@ -182,7 +183,7 @@ end function toggleData() { if (map.dataLayer.visibility) { <%= remote_function :url => { :controller => 'browse', :action => 'start' } %> - } else { + } else if (map.dataLayer.active) { closeSidebar(); } }