problem to setup OnClick event and OnHover event in action(add_spots);

  • Hi,

    while changing my static code to a more dynamic one,
    i'm using a piece of code from Klaus virtual tour example and have modified to fit my needs
    and it works fine but i meet 2 problems

    -i cannot set up a style change in the OnClick :
    (here i want to assign/change the style of the maps spot clicked so user know it's already visited)

    -i cannot setup an OnHover event with showtext and if statement :
    (here i want to display my showtext onhover the maps spot, but i find difficult to adapt my old static code to this dynamic one)

    so it was my old code to add spots on maps :

    Code
    <spot name="spot_map_pano_01_set_01" lat="14.745278" lng="100.490278" heading="92.82" style="DEFAULT2"
    		      onhover="
    		      if(interface_lang == french, 	showtext(titre  ,MAPTEXTSTYLE) );
    		      if(interface_lang == english,        showtext(title ,MAPTEXTSTYLE) );
    		      "
    		      	onclick="copy(mapspotname,name);set(mapspot_just_clicked,true);call(panodata[pano_01_set_01_variables].pano_load);"
    			   	
    		      active="true" 
    		      />


    but as a static code i must add this piece of code for every new pano,
    then i translated in dynamic code as :


    so it works fine and every single maps spot has an OnClick specific action,
    but changing style (plugin[maps].spot[get(SPOT_NAME)].loadstyle, blue;) in Onclick not works AND the OnHover action not works as expected *confused*

    Any advice, help ?
    Thanks *smile*

    z

Participate now!

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