A few weeks ago I posted a problem that I was having with IE11, didn't hear 
anything back and was able to code an awkward work around for my specific issue

https://www.mail-archive.com/openlayers-users@lists.osgeo.org/msg11768.html

Well yesterday I realized I was having a similar issue with the GetFeature 
control

I found this solution on the OpenLayers developer list. Thank you Stephen 
Battey. I am posting it here to make the answer more widely available

http://osgeo-org.1560.x6.nabble.com/WFS-and-IE-11-td5090636.html

We override the write method in the OpenLayers.Format.XML class. After the XML 
has been generated we do a search-replace on the rogue text in the XML 
namespace.

Here is the code we run after OpenLayers has loaded:
var _class = OpenLayers.Format.XML;

var originalWriteFunction = _class.prototype.write;

var patchedWriteFunction = function()
{
        var child = originalWriteFunction.apply( this, arguments );

        // NOTE: Remove the rogue namespaces as one block of text.
        //       The second fragment "NS1:" is too small on its own and could 
cause valid text (in, say, ogc:Literal elements) to be erroneously removed.
        child = child.replace( new RegExp( 'xmlns:NS1="" NS1:', 'g' ), '' );

        return child;
}

_class.prototype.write = patchedWriteFunction;


Ralph Dell






_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to