MGeoRSS and IE

Not sure where else to post this since MGeoRSS doesn’t seem to have its own list.

I’m using MGeoRSS for my current project at work because Google’s GeoRSS API doesn’t support local GeoRSS servers – yet!

I discovered today that MGeoRSS doesn’t work in IE “out of the box”. Here’s a fix:

======================
MGeoRSS.prototype.callback = function() {
    if (this.request.readyState == 4) {
        if (this.request.status == "200") {
            var xmlDoc= null;
            if (!isIE) {
                xmlDoc = this.request.responseXML;
            } else {
                // use the IE/ActiveX XML parser
                xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
                xmlDoc.async="false"
                xmlDoc.loadXML(this.request.responseText);
            }
...
=========================

Hope this helps someone!

Leave a Reply

Your email address will not be published. Required fields are marked *