Sie sind nicht angemeldet.

1

Montag, 5. Dezember 2011, 09:41

pop up on panning: how to?

Hello,

is there a smart way to use the current pan values for displaying some kind of info box when panning around? I.e. Whilst panning, some additional infos should pop up automatically when passing by some predefined hotspots. Tried a quick search but no results.

Michael

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Montag, 5. Dezember 2011, 10:30

you could use the onviewchange event, to read out the current pan, and display a popup based on that.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<events onviewchange="popup()" />

<action name="popup">
  if(ath GT 0,
        if(ath LT 90,
                //if the pan is between 0 and 90, your popup script here
        );
 );
  if(ath GT 90,
        if(ath LT 180,
                //if the pan is between 90 and 180, your popup script here
        );
 );
</action>

3

Montag, 5. Dezember 2011, 15:01

Thank you very much Zephyr! Sounds like a very straightforward solution to me. I will try.

Michael