You are not logged in.

1

Friday, April 10th 2015, 9:50am

turning off mapspots (spots)

hi, one more question to mapspots - <spot>
I want them to turn on and off by an action. I tried things like switch (plugin[skin_map].spot[xy].visible) or set(plugin[skin_map].spot[xy].alpha, 0) but nothing seems to make my spots disappear. What am I doing wrong?

thanks

This post has been edited 1 times, last edit by "Muxi" (Apr 10th 2015, 7:22pm)


2

Sunday, April 12th 2015, 10:20am

ok, now I got it all *thumbsup*

to remove all scene-mapspots:

Source code

1
2
3
4
5
6
7
for(set(i,0), i LT scene.count, inc(i),
			if(scene[get(i)].lat,
				txtadd(spotoff, 'spot', get(i));
				plugin[skin_map].removespot(get(spotoff));
				);
			  );
	 	


to bring them back again use the skin_addmapspots-action but adding the map-plugin-name before the addspot-action:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
for(set(i,0), i LT scene.count, inc(i),
			if(scene[get(i)].lat,
				txtadd(spotname, 'spot', get(i));
				txtadd(spotclickevent, 'skin_hidetooltips(); activatespot(',get(spotname),'); loadscene(', get(scene[get(i)].name), ',null,MERGE,BLEND(1)); skin_updatescroll(); delayedcall(0.5,skin_showmap(false));');
				copy(scene[get(i)].mapspotname, spotname);
				plugin[skin_map].addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent), null);
				if(skin_settings.tooltips_mapspots,
					set(layer[skin_map].spot[get(spotname)].tooltip, get(scene[get(i)].title) );
					txtadd(layer[skin_map].spot[get(spotname)].onover, 'set(hovering,true);',  get(style[skin_tooltips].onover) );
					txtadd(layer[skin_map].spot[get(spotname)].onout,  'set(hovering,false);', get(style[skin_tooltips].onout)  );
				  );
			  );
		  );

Similar threads