Hi, looks that spotstyle doesn't support onover and onout...
Is there a way to dynamicly add a onover and onout state for all the map spots ?
Thanx !
Add onover onout action for all spot
-
-
Not sure but i think you can manage with
http://www.krpano.com/plugins/googlemaps/#spoteventsHope it helps
Tuur
-
-
Yeah.. Sorry
I misinterpreted the word event in this case.
Tuur -
Ok, still not working but I'm just missing a small trick I guess...
So I have spots already in my xml file, onloadcomplete I call a function to add an onover and onout function to all my spots :Code
Display More<spot name="myspot1" active="false" style="panorama" lat="49.07166780000001" lng="2.1664232000000005" heading="0" onclick="" tooltip="Youpi" /> <action name="tooltip_map"> for(set(i,0), i LT plugin[map].spot.count, inc(i), txtadd(spotname, get(spot[get(i)].name)); txtadd(layer[map].spot[get(spotname)].onover, 'set(hovering,true);', get(style[skin_tooltips].onover) ); txtadd(layer[map].spot[get(spotname)].onout, 'set(hovering,false);', get(style[skin_tooltips].onout) ); ); </action>
it counts the spot allright but don't get the spot name, so it create a <spot name="null" onover=".../>
What is wrong with my code ?
-
What is wrong with my code ?
This is wrong: (you're trying to access a global 'spot' array)
txtadd(spotname, get(spot[get(i)].name));correct would be:
txtadd(spotname, get(layer[map].spot[get(i)].name));But you wouldn't need the name of the spot - just use the 'i' index - that would work too:
txtadd(layer[map].spot[get(i)].onover, 'set(hovering,true);', get(style[skin_tooltips].onover) );
txtadd(layer[map].spot[get(i)].onout, 'set(hovering,false);', get(style[skin_tooltips].onout) );Best regards,
Klaus -
Thanx Klaus, works perfect !
With the default "tooltip" function from the vtourskin the tooltip is displayed, but I would like to make the tooltip parent to the spot so it doesn't follow the mouse position :Code
Display More<style name="skin_tooltips" onover="txtadd(spottxt, 'data:', get(name)); copy(layer[skin_tooltip].html, get(spottxt)); set(layer[skin_tooltip].visible, true); tween(layer[skin_tooltip].alpha, 1.0, 0.5); txtadd(spotparent, 'plugin[map].spot(', get(name),')'); copy(layer[skin_tooltip].parent, spotparent);" onout="tween(layer[skin_tooltip].alpha, 0.0, 0.1, default, set(layer[skin_tooltip].visible,false));" />
but it doesn't work...
can a textfield be parent of a map spot ? -
can a textfield be parent of a map spot ?
No, that's not possible, the map spots aren't 'normal' krpano elements - there are special elements inside the maps plugins and technically different and depending on the maps APIs. That means not krpano draws and moves the map spots, this will be done by the maps API itself.
-
Ok, thanx Klaus for your fast answer ;)
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!