embedpano modifying path to xml

  • I have the following line in a script tag on my html page:

    Zitat

    embedpano({swf:"/fullClimb/hi-res/xml/1-1_Panorama.swf", xml:"/fullClimb/hi-res/xml/1-1_Panorama.xml", target:"pano", html5:"prefer", passQueryParameters:true});

    However, the viewer seems to be trying to load "/fullClimb/hi-res/xml/../../xml/1-1_Panorama.xml" instead of the path I have entered. Does anyone know why embedpano would interpolate the extra "../../xml" into the path? I have tried a variety of paths and some suffer from this interpolation while others don't. I've attached an image of the error message. Any suggestions would be greatly appreciated!

  • I have the following line in a script tag on my html page:

    However, the viewer seems to be trying to load "/fullClimb/hi-res/xml/../../xml/1-1_Panorama.xml" instead of the path I have entered. Does anyone know why embedpano would interpolate the extra "../../xml" into the path? I have tried a variety of paths and some suffer from this interpolation while others don't. I've attached an image of the error message. Any suggestions would be greatly appreciated!

    The paths are relative to the html file as stated on this page:

    https://krpano.com/docu/html/#embeddingparameters

    Where is your html file located?

    edit: also, you only need to add the path to the .swf file. The other files will inherit the same path als the .swf file, if the file names correspond. See also the above link.

  • I have a base directory called "fullClimb." Inside of fullClimb, I have a directory called html which contains a file "demo.html" which contains the snipped I quoted above.

    I have another directory called "hi-res" which has folders for all my tile images ("1-1_Panorama.tiles", "2-1_Panorama.tiles", etc.) and a folder called "xml" with all of my xml files.

    So the relative path from demo.html to 1-1_Panorama.xml is "../hi-res/xml/1-1_Panorama.xml" and the absolute path is "/fullClimb/hi-res/xml/1-1_Panorama.xml"

    What is strange to me is that embedpano seems to be inserting stuff into the middle of the path I have specified, looking at "/fullClimb/hi-res/xml/../../xml/1-1_Panorama.xml" rather than "/fullClimb/hi-res/xml/1-1_Panorama.xml" as I specified.

    Thanks for the tip on only specifying .swf. I will omit the xml path and keep trying.

  • I have a base directory called "fullClimb." Inside of fullClimb, I have a directory called html which contains a file "demo.html" which contains the snipped I quoted above.

    I have another directory called "hi-res" which has folders for all my tile images ("1-1_Panorama.tiles", "2-1_Panorama.tiles", etc.) and a folder called "xml" with all of my xml files.

    So the relative path from demo.html to 1-1_Panorama.xml is "../hi-res/xml/1-1_Panorama.xml" and the absolute path is "/fullClimb/hi-res/xml/1-1_Panorama.xml"

    What is strange to me is that embedpano seems to be inserting stuff into the middle of the path I have specified, looking at "/fullClimb/hi-res/xml/../../xml/1-1_Panorama.xml" rather than "/fullClimb/hi-res/xml/1-1_Panorama.xml" as I specified.

    Thanks for the tip on only specifying .swf. I will omit the xml path and keep trying.

    I've tested it for you. Actually it's really simple:

    Code
    <script src="../pano.js"></script>
    <div id="pano" style="width:100%;height:100%;">	<noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>	<script>		embedpano({swf:"../pano.swf", xml:"../xml/pano.xml", target:"pano", html5:"only", passQueryParameters:true});	</script></div>

    Note that you also need to add ../ to pano.js if the js file is located in the root folder.

    Furthermore, for your tiles you also need to add something like this (don't pay attention to the file names, those are for my case) :

    Code
    <scene name="pano">        <preview url="../hi-res/pano.tiles/preview.jpg" />
            <image>            <cube url="%SWFPATH%/../hi-res/pano.tiles/pano_%s.jpg" />            <mobile>                <cube url="%SWFPATH%/../hi-res/pano.tiles/mobile_%s.jpg" />            </mobile>        </image>    </scene>

    Or use the %SWFPATH% placeholders in the xml.

    See: http://www.krpano.com/docu/xml/#url-notes

    I don't know if this works in the html, I don't think so. In case of the images in the xml, you would have the following path:

    Code
    <scene name="pano">        <preview url="%SWFPATH%/../hi-res/pano.tiles/preview.jpg" />
            <image>            <cube url="../hi-res/pano.tiles/pano_%s.jpg" />            <mobile>                <cube url="../hi-res/pano.tiles/mobile_%s.jpg" />            </mobile>        </image>    </scene>

    It's important to understand that the paths are "relative to the html file" as I stated earlier.

    Hope it helps.

    Einmal editiert, zuletzt von Ibrendie (24. April 2015 um 12:24)

Jetzt mitmachen!

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