Labels

Labels are texts which are positioned on top of the map. Labels can contain other labels, movies or lines.

Labels should be placed in <labels> node:

<code xml> <labels>

<label x="0" y="25" width="100%" color="#FF0000" text_size="15">
  <text><![CDATA[<b>This is clickable label </b>]]></text>
  <description><![CDATA[<b>Some html formatted description can be placed here</b>]]></description>
</label>
<label lat="51.5002" long="-0.1262" color="#FF0000" text_size="10">
  <text><![CDATA[London]]></text>
</label>

</labels>

In the example above there are two labels described. First labels' position is set using x and y, this means the label will not move together with the map. The first label has description, this means that a text box with the text from description will popup when user clicks on the label.

The second label's position is set using lat (latitude) and long (longitude), this means it will move together with the map.

Below are all available label properties (attributes)

NameTypeIf not setDescription
x, yNumber, Number% or !Number If you want your label to be bounded to the stage, set x and y properties. This means that this label will not move together with the map. To find desired x and y, use developer mode.
lat, longNumber If you want your label to be bounded to the map, set lat and long (latitude and longitude) properties. This means that this label will move together with the map. To find desired lat and long, use developer mode.
widthNumber or Number% Width of your label text field.
alignleft / right / centerleftAlignment of text in text field.
rotatetrue / falsefalseIf you set this property to "true" the label will be rotated by 90 degrees.
fixed_sizetrue / falsetrue"true" means that the label will remain the same size when zooming the map. Set this property to false if you want text to resize together with the map.
remaintrue / falsetrue"true" means that this label will remain visible when user clicks on it or on other objects in the same level. If your label has child objects, you might want to make it invisible - set this property to "false" then.
oidString Unique object id. You only need it if you want to make "link" from one object to another.
text_sizeNumber<settings><text_size>Text size. If not set, will be equal to <text_size> set in settings file.
colorHex color code<settings><text_color>Text color. If not set, will be equal to text_color set in settings file.
color_hoverHex color code Label text color when user roll-overs it. Label will not change color if this property is not set.
bg_colorHex color code Label background color.
bg_alphaNumber100Opacity of a background.
titleString Label title. Title can be displayed in a roll-over balloon.
urlString There are several options: 1) web site address: http://www.ammap.com 2) JavaScript function: javascript:alert('label clicked'); 3) #top - will go to top level of your map 4) #parent - will go one level up 5) #object_id - will act as if object with oid="object_id" was clicked.
targetString Target of url. Will work only if url is web site address. Do not set any target if you want this page to be opened in the same window. For a new window use "_blank".
zoom_x, zoom_y, zoomNumber% You should set zoom_x, zoom_y and zoom if you want map to be zoomed or moved to a different position when user clicks on the movie. To find out these values, turn developer mode on, set desired zoom level and position, copy "zoom info" to clipboard and paste it into movie node.
text_boxtrue / false<settings><text_box><enabled>Text box displays description of your movie. If your movie has description, but you don't want text box to appear, set this attribute to false.
text_box_xNumber, Number% or !Number<settings><text_box><x>Text box x position.
text_box_yNumber, Number% or !Number<settings><text_box><x>Text box x position.
text_box_widthNumber or Number%<settings><text_box><width>Text box width.
text_box_heightNumber or Number%<settings><text_box><height>Text box height.
balloontrue / falsetrueIf you want to disable roll over balloon for your label, set this attribute to false.
link_withother objects' oid attributes, separated by commas If you want some other objects to change color when user rolls over or clicks on this label, you can add object's ids (oid) here.
activetrue / falsetrueIf set to true the label will not react to mouse over and will not "steal" hover effect from underlying objects.

Hint: if you add ! before x, y, text_box_x, text_box_y the position will be calculated from the opposite side.