• Hi,

    I feel rather stupid, but I can't seem to find how to use a generic XML. I want to switch from an old (other) viewer to KRPano and continue to use the current setup to call the viewer. this would be someviewer.html?file=pano.jpg (which is a sphere). The jpg already exists on the server. I can setup the HTML and use JS to extract the name from the URL to be available as a parameter, without a problem, but I would rather not create a new XML for every pano. Since KRPano does NEED an XML (right?), is there a way to use a generic XML? I only need the <image> entry, but since that refers to the name of the pano, how do I parse or fill it?

    Code
    <image>
        <sphere url="pano.jpg" />
    </image>

    thanks!
    Probably very easy, but I am a bit lost...

    Thanks!

  • i dont know about yout programing skills.. you got server for server side? only javascript?

    with javascript you can load the "template xml" and then change the variable containting the image wich you get from the querystring
    or make a loadxml with the flags for keeping all
    with php, aspx you might insert the content or include a <include yout file> describing the cene


  • i dont know about yout programing skills..

    Not great.
    Let me elaborate: All images are already loaded at the clients side. Now being used by some older viewer. I would like them to use KRPANO. The call at the moment is: ....somehtmlwithJS.html?file=panonumber1.jpg if they click on some hotspot link. I would like to change just the somehtmlwithJS.html to call KRPANO instead of the oldviewer and open this panonumber1.jpg. Of course I could create an xml file for this panonumber1.jpg and every other pano, but I would prefer to only have to upload KRPANO viewer files and the new somehtmlwithJS.html and call the already existing panos.

    At the moment I can simply call:
    embedpano({swf:panofile, xml:panoxml, target:"pano", html5:"prefer", passQueryParameters:true});
    where panofile is a reference to this panonumber1.jpg and panoxml might be a reference to 1 generic xml file if that's what I need. It could also be a reference to an xml file per pano, but as I explained, I prefer not to...

    At the moment, I only want to view 1 pano per time, without any extras. Perhaps there are better ways, if so, I would like to hear of them please.
    To cut a long story short; I would like not to bother the client too much, only have them upload the KRPANO main files, and the somehtmlwithJS.html. Would that be possible?

    I have been looking everywhere and think I have come accross many options, but I don't understand them. Probably initvars or so?

    cheers!

  • I am a lot closer now, but I still can't get it to work:

    I can get the correct pano loaded if I run the query like:

    Code
    ...html?xml=null&onstart=loadxml('<krpano><image><sphere url="pano.jpg"/></image></krpano>');

    But shouldn't i be able to run it as well from within the html, without above query, like:

  • Nobody?

    I think I will generate XML files anyway for the old panos on the clients server, but I would still very much like to know what I am doing wrong with the indicated LOADXML method? I hope somebody can tell me?

    Cheers!

  • if you are creating xml files for all the panos why dont you just
    loadpano(xml-file-you-generated);
    ?

    Hi herrpedro,

    thanks very much for following up.
    I can get it to work with creating XML files, in that case I don't even need LOADPANO, because I already extracted the name of the pano.jpg from the query line. Since I cannot get it to work without XML files, I am very tempted to stop chasing it and generate XML files, which is quite a job (I need to get all the current panos on the clients server). And even so, for me personally, would like to know how to pass the LOADXML string, as I have read it should be possible, but i have not seen any working example. Or been able to create it.

    As far as I understand, with LOADXML I don't need LOADPANO, but perhaps I am wrong and that's exactly what is failing?

    Cheers!

  • this is theory but...
    if you built a plain template xml file and load it with a regular html generated by krpano
    your querystring has the image url (or the variable part of it) url

    template.xml
    <krpano>
    <image>
    </image>
    </krpano>


    you start with an action
    that sets
    image.type to "sphere"
    image.sphere.url to the variable in the query string


    i might try this @ home but i guess it should work

Jetzt mitmachen!

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