I am trying to serve up a map in Internet Explorer that works fine in Firefox or Chrome. While debugging I noticed that something was missing when I tried to bring up the map in IE. This is the html that is in Firefox with the working map:
This is the html that is missing essential elements for the map:
This occurs after I draw a bounding box and submit a search, the search is supposed to find and results that are in the bounding box. Then draw the whole area that each result covers. When the results are supposed to be displayed is when the map does not appear in Internet Explorer 11. A blank map-panel is still displayed but it is missing the map tiles. When you "zoom in" to the map I get this error: Unable to get property 'style' of undefined or null reference.
Can anyone help me figure out why IE leaves these elements out?
After loading Openlayers use this code
After much trial and error (and hours on google) I managed to figure out that IE seems to forget how to render your map if you remove it from the page then try to draw vectors/extents on it and bring it back. The solution that ended up working was that I had to reinitialize the map every time I wanted it displayed.
Looks like you're not using HTML5 mode for your web page in IE11, and hence get no Canvas support.
Make sure that your doctype (i.e. the first line of your HTML file) is
Also make sure you don't use any meta tags that tell IE11 to use a compatibility mode.