BuddySpace map structure
the parser is case-sensitive,
i.e. all tags have to be in lower case
Map tag
<map id="name_of_file.ygf" xmlns="http://jabber.open.ac.uk/tags/map"/>
- can include several
layers
Layer tag
<layer id="layer_ID" offset_x="50" offset_y="110" scale="0.5" priority="1"/>
Img tag
<img src="pict.jpg" width="100" height="200"/>
- map image source
file and its size in pixels
Cluster tag
<cluster lat="60" lon="110" size="80" name="my_cluster"/>
- coordinates of
cluster in image in pixels
- size of area for
which JIDs were clustered
- can contain name of
the cluster
- can include cluster
and/or item tags
Item tag
<item jid="buddy@server.com" lat="30" lon="150"/>
- JID of contact
and coordinates in image in pixels
Examples:
you can find the following
examples in examples directory in maps and test them directly in BuddySpace
1) single map with
2 JIDs
<map id="map1.ygf" xmlns="http://jabber.open.ac.uk/tags/map">
<layer id="inset_1" offset_x="0" offset_y="0" scale="1">
<img src="ortho_0.gif" width="242" height="243"/>
<item jid="buddy1@jabber.org" lat="35.0" lon="135.0"/>
<item jid="buddy2@jabber.org" lat="153.33333" lon="175.0"/>
</layer>
</map>
2) map with 2 layers
- big map with an inset
<map id="map2.ygf" xmlns="http://jabber.open.ac.uk/tags/map">
<layer id="big_map" offset_x="0" offset_y="0" scale="1" priority="0">
<img src="Euro.gif" width="400" height="380"/>
<item jid="buddy4@jabber.org" lat="212.5" lon="153.75"/>
<item jid="buddy5@jabber.org" lat="180.0" lon="77.5"/>
</layer>
<layer id="inset" offset_x="277" offset_y="2" scale="0.5" priority="1">
<img src="ortho_0.gif" width="242" height="243"/>
<item jid="buddy1@jabber.org" lat="35.0" lon="135.0"/>
<item jid="buddy2@jabber.org" lat="153.33333" lon="175.0"/>
</layer>
</map>
3) map with layer
referencing another map and defined inset
<map id="map2.ygf" xmlns="http://jabber.open.ac.uk/tags/map">
<layer id="big_map" offset_x="0" offset_y="0" scale="1" priority="0">
<img src="Euro.gif" width="400" height="380"/>
<item jid="buddy4@jabber.org" lat="212.5" lon="153.75"/>
<item jid="buddy5@jabber.org" lat="180.0" lon="77.5"/>
</layer>
<layer id="inset" offset_x="277" offset_y="2" scale="0.5" src="map1.ygf" priority="1"/>
</map>
4) map with cluster
hierarchy
<map id="map4.ygf" xmlns="http://jabber.open.ac.uk/tags/map">
<layer id="only_one" offset_x="0" offset_y="0" scale="1">
<img src="ortho_0.gif" width="242" height="243"/>
<cluster lat="35" lon="135" size="10">
<item jid="buddy1@jabber.org" lat="30" lon="140"/>
<cluster lat="38" lon="134" size="5">
<item jid="buddy2@jabber.org" lat="37" lon="135"/>
<item jid="buddy3@jabber.org" lat="39" lon="133"/>
</cluster>
</cluster>
<item jid="buddy4@jabber.org" lat="153.33333" lon="175.0"/>
</layer>
</map>
|