diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-03 09:50:05 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-03 09:50:05 +0100 |
commit | dbaf8d84b9cd52380a031b801370bb6a0f8e4c22 (patch) | |
tree | d1841a90f8536ca17df49e2b667b4d3a096de31e /web/js/map-OpenLayers.js | |
parent | 9415569a17bf3044c7f3253c923f556436d48942 (diff) | |
parent | 76f39991e1caf89e12e8bb8f49ba0a99df56f3dc (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into open311-consumer
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 6b4a03d7e..d00079517 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -41,6 +41,15 @@ $(function(){ return false; }); + // Vector layers must be added onload as IE sucks + if ($.browser.msie) { + $(window).load(fixmystreet_onload); + } else { + fixmystreet_onload(); + } +}); + +function fixmystreet_onload() { if ( fixmystreet.area ) { var area = new OpenLayers.Layer.Vector("KML", { strategies: [ new OpenLayers.Strategy.Fixed() ], @@ -96,8 +105,7 @@ $(function(){ var bounds = fixmystreet.markers.getDataExtent(); if (bounds) { fixmystreet.map.zoomToExtent( bounds ); } } - -}); +} function fms_markers_list(pins, transform) { var cols = { 'red':'R', 'green':'G', 'blue':'B', 'purple':'P' }; |