Sie sind nicht angemeldet.

1

Mittwoch, 29. April 2009, 10:31

Best method for custom map navigation?

I have a map of a new park where I intend to shoot a tour sequence. I'd like to use the map as the main tour navigation. Nothing too fancy - just the map with a bunch of clickable spots to navigate to the other panoramas.

What's the easiest way to do that ? I'm thinking just to drop the whole thing into Flash, include some onclick or onrelease events that load the relevant panorama xml files, then export from Flash as a single swf file and use that as a plugin.

Does that sound the easiest method ?

Any thoughts appreciated.

Shanti

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

2

Mittwoch, 29. April 2009, 17:24

I have never tried it, but look in the examples\tour folder from krpano and there is an example on how to put a map. its easier than creating a swf, but your idea is also possible :)

Tourvista

Fortgeschrittener

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

3

Mittwoch, 29. April 2009, 18:27

I did this map using krpano code and xml files:

National Space Cente

At the beginning I tried to do it using flash but I realized that I had to type a lot and the chances that something were wrong (and it was wrong) were bigger.

The xml file looks quite intimidating xml file but believe me, it is the same thing copied and pasted 35 times plus some minor changes :-)

In my case using xml files worth it as because of it's simplier to type and easier to read.

4

Montag, 4. Mai 2009, 10:40

Hi,

both ways are possible, via Flash or via XML

Zitat

The xml file looks quite intimidating xml file but believe me, it is the same thing copied and pasted 35 times plus some minor changes :-)
here some small hints to reduce the xml code lines and make it easier to change:

instead of repeating always the same code with different attributes,
like here from your xml:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<plugin name="exploring_the_universe_2_box"
    url="images/box.png"
    zorder="20"
    align="center"
    edge="lefttop"
    x="-40"
    y="-144"
    alpha="0"
    visible="false"
    onover="action(fadein,exploring_the_universe_2);"
    onout="action(fadeout,exploring_the_universe_2);"
    onclick="loadpano(02_exploring_the_universe_2.xml,null,KEEPPLUGINS,BLEND(1)); set(plugin[hideplan].visible,false);
                  set(plugin[showplan].visible,true); action(hidewholeplan);" 
    /> 

<plugin name="exploring_the_universe_2"
    url="images/exploring_the_universe_2.png"
    zorder="30"
    align="center"
    edge="lefttop"
    x="-86"
    y="-300"
    alpha="0"
    visible="false"
    />

<plugin name="the_planets_1_box"
    url="images/box.png"
    zorder="20"
    align="center"
    edge="lefttop"
    x="39"
    y="-136"
    alpha="0"
    visible="false"
    onover="action(fadein,the_planets_1);"
    onout="action(fadeout,the_planets_1);"
    onclick="loadpano(03_the_planets_1.xml,null,KEEPPLUGINS,BLEND(1)); set(plugin[hideplan].visible,false);
         set(plugin[showplan].visible,true); action(hidewholeplan);" 
    /> 

<plugin name="the_planets_1"
    url="images/the_planets_1.png"
    zorder="30"
    align="center"
    edge="lefttop"
    x="-7"
    y="-292"
    alpha="0"
    visible="false"
    />



you could create a action that creates dynamically the plugins and sets the attributes:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<action name="create_thumb">
  addplugin(%1_box);
  set(plugin[%1_box].url,images/box.png);
  set(plugin[%1_box].zorder,20);
  set(plugin[%1_box].align,center);
  set(plugin[%1_box].edge,lefttop);
  set(plugin[%1_box].x,%3);
  set(plugin[%1_box].y,%4);
  set(plugin[%1_box].alpha,0);
  set(plugin[%1_box].visible,false);
  set(plugin[%1_box].onover,action(fadein,%1));
  set(plugin[%1_box].onout,action(fadeout,%1));
  set(plugin[%1_box].onclick, loadpano(%2,null,KEEPPLUGINS,BLEND(1));
                                       	set(plugin[hideplan].visible,false);
                                       	set(plugin[showplan].visible,true); 
                                       	action(hidewholeplan);
                                      	); 
  addplugin(%1);
  set(plugin[%1].url, images/%1.png);
  set(plugin[%1].zorder,30);
  set(plugin[%1].align,center);
  set(plugin[%1].edge,lefttop);
  set(plugin[%1].x,%5);
  set(plugin[%1].y,%6);
  set(plugin[%1].alpha,0);
  set(plugin[%1].visible,false);
</action>


and then call just this action a serveral times:

Quellcode

1
2
3
4
5
<action name="setup_thumbs">
  action(create_thumb, exploring_the_universe, 02_exploring_the_universe_2.xml, -40, -144, -86, -300);
  action(create_thumb, the_planets_1, 03_the_planets_1.xml, 39, -136, -7, -292);
  ...
</action>


best regards,
Klaus

Ähnliche Themen