• Resolved ImTheirWebGuy

    (@imtheirwebguy)


    Map fails to load, grey background shown. Works fine on back end. Code inspector reveals JS error here:

    XML Parser could not be instantiated

    Which traces back here:

    // Convert text to XML DOM
      text2xml: function(str) {
       // NOTE: I'd like to use jQuery for this, but jQuery makes all tags uppercase
       //return $(xml)[0];
       var out;
       try{
        var xml = (jQuery.browser.msie)?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();
        xml.async = false;
     }catch(e){ throw new Error("XML Parser could not be instantiated") };
       try{
        if(jQuery.browser.msie) out = (xml.loadXML(str))?xml:false;
        else out = xml.parseFromString(str, "text/xml");
       }catch(e){ throw new Error("Error parsing XML string") };
       return out;
      }

    …but I can’t figure out why. Anyone have a suggestion?

    https://www.ads-software.com/plugins/easy2map/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ImTheirWebGuy

    (@imtheirwebguy)

    Found it. You’ll need to grab the updated jQuery.xml2json.js from below and replace the one included in the theme as it’s out of date.

    https://www.fyneworks.com/jquery/xml-to-json/

    Hi! Thanks a lot for the solution! I had the same problem, the map didnt show.
    In my case my theme didnt have this file, I searched it and didnt find it.

    So I replaced the Easy2map plugin file (wp-content/plugins/easy2map-photos/scripts/jquery.xml2json.js, it was a 2008 version) with the one from your link (a 2013 version).

    After that my Easy2map map works!

    Thread Starter ImTheirWebGuy

    (@imtheirwebguy)

    ?? Glad it worked for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Map fails to load in front end’ is closed to new replies.