I have still problems to understand the correct handling of passQueryParameters

  • In my panos I pass a variable 'design' to distinguish betweeen mobile or desktop applications, for example:

    <include url="../skins/d_skin.xml" if="design == default_" />

    <include url="../skins/m_skin.xml" if="design == mobil_" />
    In either case the special skin for mobile or desktop will be selected

    In order to pass the variable 'design' the index.html looks like this:
       <script>embedpano({xml:"example.xml", target:"pano", initvars:{design:"default_" }, passQueryParameters:true}); </script>

    or
       <script>embedpano({xml:"example.xml", target:"pano", initvars:{design:"mobile_" }, passQueryParameters:true}); </script>
    This works properly! But I want to get rid of passQueryParameters:true

    If I set passQueryParameters:false the pano will not start at all. This I can still understand.

    But if the code is for example like
        <script>embedpano({xml:"example.xml", target:"pano", initvars:{design:"mobile_" } }); </script>

    as shown in the documentation the pano does also not start!

    Can anybody tell me, what do I wrong or what is the solution ?
    I currently use krpano 1.22.2

    my homepage: foto180.de

    • New
    • Official Post

    Hi,

    first I would recommending update to 1.22.4 to ensure that no unwanted parameters can be used/passed.

    then about the passQueryParameters:true - in your case change it to:

    Code
    passQueryParameters:"startpano,design"

    and eventually add even more parameters (depending on your need).

    Best regards,
    Klaus

  • Hi Klaus,

    thank you for your instant message after midnight.

    I tried it immediatelly, but it does not work. Opening the pano, the screen gets white, nothing happens. *question**question*

    What would be different switching to 1.22.4 ?

    Regards, Ewald

  • II am sorry, I do not know, how to show you a link

    I can only show you the original code with the recommended correction:

    <script>
    embedpano({xml:"kirchen_de.xml", target:"pano", initvars:{backhtml:"v2", design:"default_", org:"kirchen_" }, passQueryParameters:"backhtml,design,org"});
    </script>

    Maybe, you can verify it, looking at my website: foto180.de

    go to '360 Grad Panoramen' --> 'Kirchen' --> 'Deutschland'

    all of the about 150 churches depend on this code.

    I have an Idea: I modify my webpage for this afternoon: Churches Germany get the modified code, Churches France keep the old code, so you can see the difference.

    I do not have a better Idea.

    But thanks a lot for your excellent service

  • Hi, midnight worker!

    Problem solved! I forgot 'startpano'

    I added 'startpano' to the passQueryParameters list: passQueryParameters:"startpano,backhtml,design"

    NO 'true' anymore!

    My experience: in most cases not the code is the problem. The problem is sitting between the left and the right ear.*smile*

    Many thanks, Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!