Klaus,
thank you very much: I will try to implement.
Previously I tried:
krpano.events.onnewscene = function(){ ..
here map.latLngToContainerPoint() a function from Leaflet which converts geographical coods to x.y coords
and code to set x, y coords for an activespot/layer in in the xml
.... }
The above is in the plugin.js file and It works, but perhaps it is not a clean code, so I will change according to your coding.
I would prefer to do the following in xml code :
<scene name="my_ scene" onstart="update_spot_onthemap();">
<action name="update_spot_onthemap">
.............//here I would put in some way map.latLngToContainerPoint() which gives x,y coords of a point on the map
set(layer[activespot].x, 'coord.x');
set(layer[activespot].y, 'coord.y');
</action>
In general (for other use): after plugin.my_function = function(){ } in the plugin.js I can call/use my_function in the xml. Is that correct?
Thank you and best regards,
Giuseppe