home support forum
 
ammap your interactive map tool
 
DownloadExamplesFAQDocumentationBuyFree maps
 
 

DATA FILE: 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:

<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>

</labels>

All available label properties (attributes)

Name Type If not set Description
x 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.
y Number or Number%  
lat Number   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.
long Number  
width Number or Number%   Width of your label text field.
align left / right / center left Alignment of text in text field
rotate true / false false If you set this property to "true" the label will be rotated by 90 degrees.
fixed_size true / false true "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.
remain true / false true "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.
oid String   Unique object id. You only need it if you want to make "link" from one object to another.
text_size Number settings.text_size Text size. If not set, will be equal to text_size set in settings file.
color Hex color code settings.text_color Text color. If not set, will be equal to text_color set in settings file.
color_hover Hex color code   Label text color when user roll-overs it. Label will not change color if this property is not set.
bg_color Hex color code   Label background color.
bg_alpha Number 100 Label background alpha.
title String   Label title. Title can be displayed in a roll-over balloon.
url String  

There are several options:

  • web site address: http://www.ammap.com
  • JavaScript function: javascript:alert('label clicked');
  • #top - will go to top level of your map
  • #parent - will go one level up
  • #object_id - will act as if object with oid="object_id" was clicked
target String   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 Number%   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 label. To find out these values, turn developer mode on, set desired zoom level and position, copy "zoom info" to clipboard and paste it into label node.
zoom_y Number%  
zoom Number%  
text_box true / false settings.text_box.enabled Text box displays description of your label. If your label has description, but you don't want text box to appear, set this attribute to false.
text_box_x Number or Number% settings.text_box.x Text box x, y, width and height. All these values can be set in pixels or in percents. To find out desired x and y, use developer mode. If you do not set these values, the default values from settings file will be used.
text_box_y Number or Number% settings.text_box.y
text_box_width Number or Number% settings.text_box.width
text_box_height Number or Number% settings.text_box.height
balloon true / false true If you want to disable roll over balloon for your label, set this attribute to false.

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

 
© Antanas Marcelionis Contact and feedback: info@ammap.com * a very good one ;)