How to use the vars object with embedpano?

  • Hi,

    that's a Javascript Object, and you can define the variables with it's values as properties of that object,

    e.g.

    Code
    embedpano({xml:"krpano.xml", target:"krpanoDIV", vars:{onstart:"trace(hello)", simulatedevice:"UserAgent"}});

    or create the vars object before the embedding and then pass it:

    Code
    var vars = {};
    vars["onstart"] = "trace(hello);";
    vars["plugin[test].url"] = "test.jpg";
    ...
    embedpano({xml:"krpano.xml", target:"krpanoDIV", vars:vars}});

    best regards,
    Klaus

Participate now!

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