Search code examples
internet-explorer-9openlayers-3

OpenLayers 3 Map is awfully slow in IE9


I have an OL3 Map containing a Tile Layer with an XYZ Source. In IE10+ and other Browsers (i.e. Chrome and Firefox) performance is great, but in IE9 it's really, really slow. I tried using DOM renderer instead of Canvas but that didn't help. According to the docs IE9 should be supported, so I'm a little stuck here. My Map construct is as follows:

<script>
    var _maxExtent = [-20000000.000000, -9500000.000000, 20000000.000000, 14500000.000000];
    var map = new ol.Map({
        layers: [
            new ol.layer.Tile({
                extent: _maxExtent,
                source: new ol.source.XYZ({
                    url: "http://myserver/map/z{z}/row{y}/{z}_{x}-{y}.jpg"
                })
            })
        ],
        view: new ol.View({
            center: [0, 2500000],
            resolutions: [
               39135.758475,
               19567.8792375,
               9783.93961875,
               4891.969809375,
               2445.9849046875,
               1222.99245234375,
               611.496226171875
            ],
            zoom: 0,
            extent: _maxExtent
        }),
        target: document.getElementById("mymap")
    });
</script>

Am I missing something? Is there a way to increase performance? Any help will be greatly appreciated.

Edit: Turns out the issue was caused by the test machine running IE9 and not OpenLayers. Performance is good in a different environment.


Solution

  • As it turned out, not OpenLayers but my test machine running IE9 caused the performance issues. Switching tests to a different environment did the trick here, so problem solved :)