Passing variable to tour.html to load specific pano

  • Hello,

    I'm trying to embed the pano in an html page when a user performs a click action. Currently the tour.html loads the first pano from the tour.xml file by default.

    How can I pass a variable or parameter to the tour.html so it loads a different pano than the first one in the tour.xml file (i.e. the second one instead)? My goal is to have similar behavior as the Bing/Google Maps plugin.

    Would the parameter be passed into the embedpano parameters? Please see attachment.

    Thank you,
    Ken

  • Hi,

    the vtourskin.xml provides a 'startscene' parameter.

    To use it either call:

    Code
    tour.html?startscene=###

    where ### is either the name or the 0-based index of the scene.

    Or if you want to set that in html itself:

    Code
    embedpano({..., vars:{"startscene":"###"});

    Btw - in the tour.xml you could enable the 'deeplinking' setting - then you will get automatically urls in the browsers address bar that links to the current scene and current view.

    Best regards,
    Klaus

Participate now!

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