Sie sind nicht angemeldet.

1

Donnerstag, 9. Februar 2012, 05:24

How to use the vars object with embedpano?

Is there any documentation for how to use the vars object to set krpano variables when using the embedpano() function? What is the syntax?
Regards,
Karel

2

Dienstag, 14. Februar 2012, 17:54

Hi,

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

e.g.

Quellcode

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


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

Quellcode

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


best regards,
Klaus

3

Dienstag, 14. Februar 2012, 18:01

Thanks Klaus :)