You are not logged in.

1

Friday, September 9th 2016, 12:28am

Can I send a click to a layer?

I have a number of 'mapspots' on a map which each loads its associated scene when clicked, as well as performing some other operations specific to that scene. Each mapspot is contained within its own layer. I also need exactly the same operations to be triggered by another part of my xml. To avoid duplicating code is there a way I can simply send a click to the onclick event of the appropriate mapspot layer?

I am a photographer, not a coder, so please forgive me if the answer to this is staring me in the face!

Regards to all

Andrew

2

Friday, September 9th 2016, 9:56pm

Hi,

the callwith action can be used for that:
http://krpano.com/docu/actions/#callwith

E.g.

Source code

1
callwith(layer[nameofthelayer], onclick);


Best regards,
Klaus

3

Monday, September 12th 2016, 1:54pm

Excellent! Thank-you Klaus, just what I needed.