Those examples are also can be seen in the Krpano donwload package (1.17/examples).
To understand how map works, see here documentation on "layer/plugin":
http://krpano.com/docu/xml/#layer
Layer is an element on the screen, which can be switched on/off or resized. Okay. Then it's clear about the layer, let's move on to the spots.
If you open "scenes-with-imagemap" example xml, you wil' see the following code:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<!-- the image map -->
<layer name="map" url="imagemap.png" keep="true" align="leftbottom" x="16" y="16" width="316" height="222"
handcursor="false"
scalechildren="true"
maskchildren="true"
onclick="closemap();"
>
<!-- 'rooms' and spots - the 'room' container elements were used for masking the radar -->
<layer name="room1" type="container" align="lefttop" x="125" y="4" width="187" height="115" maskchildren="true">
<layer name="spot1" url="mappoint.png" align="lefttop" edge="center" x="91" y="59" zorder="2" onclick="loadscene(scene1, null, MERGE, BLEND(1));" />
</layer>
<layer name="room2" type="container" align="lefttop" x="4" y="4" width="117" height="214" maskchildren="true">
<layer name="spot2" url="mappoint.png" align="lefttop" edge="center" x="61" y="104" zorder="2" onclick="loadscene(scene2, null, MERGE, BLEND(1));" />
</layer>
<layer name="room3" type="container" align="lefttop" x="125" y="123" width="187" height="95" maskchildren="true">
<layer name="spot3" url="mappoint.png" align="lefttop" edge="center" x="92" y="46" zorder="2" onclick="loadscene(scene3, null, MERGE, BLEND(1));" />
</layer>
</layer>
|
The main layer is called "map" and it's written as container element with graphic content:
|
Source code
|
1
2
3
|
<layer name="map" url="someimage".... >
......
<layer>
|
note here that the layer's closing tag is ">" (not "/>" as in normal layer) and this tag is followed by closing tag "</layer>"
So, you can put more layers between ">" and the final "</layer>". And in this example we see that here are three layers named "room1", "room2" and "room3" which have "maskchildren="true". This is to make the radar cone invisible if it reaches beyond the current room.
Each room is again written as container element and inside it - there are "spots' layers.
Then there's "radar" plugin. Read here carefully about it:
http://krpano.com/plugins/radar/#top
then there are actions which control the map and its elements. The most important here is "activatespot" action. It is called "onstart" of each scene. To understand how it works, see the following:
http://krpano.com/docu/xml/#layer.parent
http://krpano.com/docu/xml/#layer.visible
http://krpano.com/plugins/radar/#heading
and try to understand what is "parameter" in actions:
http://krpano.com/docu/actions/#syntaxandusage
Hope this makes it a bit clearer)))