getting current scene/objects xml to save on disk

  • Hello,

    I'm trying to create hotspot editor using krpano.

    I want to save every new update on scene after adding.removing etc. hotspot to .xml file using server side script.
    Is there a way to get xml as string or object for the current scene or for new objects or even whole project ?

    If I'm going wrong way, how do you manage saving all updates on panos in .xml ?

    thanks!

    Marek

    Einmal editiert, zuletzt von Marek_ (7. April 2017 um 18:32)

  • Hi,

    here a quote from the xml documentation here:
    https://krpano.com/docu/xml/#xmlstructure

    Zitat

    The xml itself is just a transport-format - that means it will be only used to transport the data for the krpano viewer.
    When the xml will parsed, then the xml elements will be transformed/mapped into the krpano internal data structures.
    That means after parsing there is internally no xml anymore.


    That means at runtime there is no xml anymore. If you want to edit the xml, then you would need to load and the edit the xml file itself. The krpano viewer itself will not output a xml file.

    Best regards,
    Klaus

  • I'm currently working on moving hotspots after mousedown. I'm using code from the dragabl-hotspots example.

    Once HS is moved I'd like to save new position in xml config file from "action" script level. Is it possible ?

    I'm adding new line like this:

    Code
    "set(hotspot[get(name)].atv, atv);"



    but that doesn't change xml content and after reload HS is in old place.

    If it's not posisble, what is the best way to save latest changes in xml ? From JS external calls level i'm using jquery call to php and then storing on server.
    Is it doable in similar way in here ? How I could call php from there ?

    thanks

    7 Mal editiert, zuletzt von Marek_ (12. Mai 2017 um 20:37)

Jetzt mitmachen!

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