[OpenLayers-Users] GetFeaturInfo call failing in IE11

Staav Per-Anders Per-Anders.Staav at norconsult.com
Thu Nov 20 00:30:42 PST 2014


I am new to this mailing list, but we have been using OpenLayers for a while.



Currently I am struggling with a problem with GetFeatureInfo and IE11 and I decided to share my experiences to hopefully help some other poor fellow to have to do the same analysis.


I am using 2.13.1 of OpenLayers and GeoServer 2.4 and have applied a couple of fixes to get it to work in IE11 for WFS calls and similar. Unfortunately I cannot sort out the GetFeatureInfo calls.

If I IE11 in Edge mode the call to OpenLayers.Format.XML.prototype.read.apply(this, [data]); eventually resolve into xmldom.loadXML(text) call failing and then  a failed call to new DOMParser().parseFromString(text, 'text/xml')

If I use IE11 and emulate previous versions (aka Quirks mode) the call to loadXML succeed even through I used the debugger to verify that in both cases the actual text sent into the function is JSON
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"id\":\"LVD_FUNCTION_OBJECT_VIEW.3010124\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[154111.811179288,6578422.01790236,0],[154111.295167272,6578428.93449788,0],[154112.323003077,6578434.88642851,0],[154119.436625185,6578454.94173547,0],[154127.927454092,6578478.22225933,0],[154130.750467693,6578486.2847629,0],[154131.816409608,6578490.96371858,0],[154130.856751895,6578508.97999902,0]]},\"geometry_name\":\"GEOLOC\",\"properties\":{\"FUNCTION_OBJECT_NO\":9112,\"FUNCTION_OBJECT_NAME\":\"Västra Terrassrampen (1) (Norra Järngraven - Katarinavägen) (050508 - 020644)\",\"TRAFFIC_TYPES\":1}}],\"crs\":{\"type\":\"EPSG\",\"properties\":{\"code\":\"3011\"}}}"
It seems very likely the problem is that IE in Quirks mode accept loadXML even when the input is JSON, but will reject such in strict mode.

I will look into using a <meta http-equiv="X-UA-Compatible" content="IE=10" /> directive or something similar to make sure Quirks mode is enabled for my OpenLayers application.

________________________________
Per-Anders Staav
Systemutvecklare
Mobil: 0768-44 10 36
per-anders.staav at norconsult.com<mailto:per-anders.staav at norconsult.com>

Norconsult Astando AB
Hantverkargatan 5K
112 21 Stockholm
www.astando.se<http://www.astando.se/>

[cid:image001.png at 01CEB60C.ADFD6250]

________________________________
________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20141120/3effb047/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7366 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20141120/3effb047/attachment.png>


More information about the Users mailing list