loadxml string doesn't work

  • I was trying to load xml string direclty, this is my code:



    You can see here, I am using angular 6 to listen to property change, if property changed, then I hope the pano can automatically load the new panorama.

    The console log is already printing the xml content like below:


    but in the UI, still the original pano, not changed at all.

    anything wrong here?

  • Hi,

    the problem might be related to the escaping, when calling loadxml this way, the xml content should be escaped to avoid parsing conflicts (e.g. when parsing the ',' characters as separators of the loadxml parameters).

    Or as you are in JS, better do a direct call to loadxml, then no escaping is necessary,

    e.g.

    Code
    var krpanoapi = this.krpano.get("global");
    krpanoapi.actions.loadxml(changes.panoXML.currentValue, null, "MERGE", "BLEND(0.5)");

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!