Thanks, Jordi and Klaus. The "Javascript actions" was comment by Jordi in PV, now with the klaus example it is a little more clear for me.
I was trying the klaus code with 100, 300, 500 until 1000 hotspot... With this useful code I answer my main doubts.
But I would like to know more about action type "javascript", for example: How to convert this xml code to javascript code in order to gain more efficient behavior.
Here my xml code:
This is example for create 100 hs at click "test" button:
|
Source code
|
1
2
|
<layer name="test" type="text" html="create 100 hotel hotspot"
onclick="creahs_hotel(hotel);"/>
|
|
Source code
|
1
2
3
4
5
6
7
|
<style
name="hotel"
url="%SWFPATH%/../list/img/hs/hotel.png"
scale.normal="0.6"
onloaded.normal="loadstyle(tooltip);"
onloaded.handheld="add_all_the_time_tooltip();"
/>
|
|
Source code
|
1
2
3
4
5
6
7
|
<action name="creahs">
addhotspot(%1);
assignstyle(hotspot[%1], '%2');
set(hotspot[%1].ath,%3);
set(hotspot[%1].atv,%4);
set(hotspot[%1].tooltip,%5);
</action>
|
|
Source code
|
1
2
3
4
5
6
|
<action name="creahs_hotel">
creahs(ambos,%1,-0.074434,-0.108655,Hotel # 1 Riviera);
creahs(hlibre,%1,-0.138722,-0.109009,Hotel # 2 Capri);
//(...)
creahs(parque1,%1,-0.091118,-0.106737,Hotel # 100 Comodoro);
</actions>
|
Best regards,
Fernando