Sie sind nicht angemeldet.

1

Freitag, 10. Juli 2020, 08:47

Show/Hide hotspots according to a zoom?

I want to display hotspots from the general view up to a certain zoom level (e.g. 1 screen pixel = 10 image pixels) and then hide them to display other hotspots.
I seem to have seen this in the documentation, but I can't find the information anymore. Can someone help me?

A very big thank you

herrpedro

Fortgeschrittener

Beiträge: 210

Wohnort: Lisbon

Beruf: Programmer/analyst

  • Nachricht senden

2

Sonntag, 12. Juli 2020, 13:16

hi,
if they no not have anything to do with each other
you do a for loop on all hostspots and add the action on onviewchange
it mught be a good ideia to copy the current zoom to a variable and, if the zoom does not change from the previous value (the user has just made a pan) you dont call this


Quellcode

1
2
	<hotspot name="some1zoom" fovmin="50" fovmax="80 otherattributes />
	<hotspot name="some2zoom" fovmin="80" fovmax="10 otherattributes />


--> action code

Quellcode

1
2
3
4
5
6
7
8
9
10
11
for(set(i,0), i LT hotspot.count, inc(i),
	copy(ly, hotspot[get(i)]);
			
	if (ly.fovmin AND ly.fovmax  , 			
		if ((view.fov LE fovmax) AND (vide.FOV GT  ly.fovmin)  ,
			set(ly.visible , true);
		,
			set(ly.visible , false);
		);
	);
);


(this was just written so forgive some typos

3

Dienstag, 4. August 2020, 08:02

Thanks for your help.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Barras« (4. August 2020, 09:14)