XML Attributes

All the maps in FusionMaps support the following attributes for <map> element:

 
Functional Attributes
These attributes let you control a variety of functional elements on the map. For example, you can opt to show/hide data values, labels etc..
 
Attribute Name Type Range Description
animation Boolean 0/1 This attribute lets you set the configuration whether the map should fade in. If you do not want to animate any part of the map, set this as 0.
showLabels Boolean 0/1 It sets the configuration whether the entity labels will be displayed or not.
includeNameInLabels Boolean 0/1 If you've opted to show map labels, this attributes lets you control whether to show entity names as a part of map labels?
includeValueInLabels Boolean 0/1 Whether to show entity values on the map as a part of map label?
useSNameInLabels Boolean 0/1 Whether to use the short name of entities in labels or full names?
useSNameInToolTip Boolean 0/1 Whether to use the short name of entities in tool-tip or full names?
showShadow Boolean 0/1 Whether to drop a shadow effect for the map?
showBevel Boolean 0/1 Whether to render a 3D bevel effect to the map?
clickURL String The entire map can act as a hotspot. Use this URL to define the hotspot link for the map. The link can be specified in FusionMaps Link Format.
defaultAnimation Boolean 0/1 By default, each map fades in. If you wish to switch off the default fading effect, you can set this attribute to 0. It can be particularly useful when you want to define your own animation patterns using STYLE feature.
hoverOnEmpty Boolean 0/1 Whether to show tool tip for those entities whose value has not been defined in the XML data?
showPrintMenuItem Boolean 0/1 Whether to show "Print Chart" item in the context menu of the chart? Even if you opt to hide the item in context menu, you can still opt to invoke print() JavaScript method of the chart to print the same.
exposeHoverEvent Boolean 0/1 Whenever the user rolls his mouse over a map entity, you can choose to track the details of that entity in your JavaScript/container Flash movie code. Just set this attribute as 1. More details on this is present in FusionMaps and JavaScript section.
showAboutMenuItem Boolean 0/1 Setting this to 1 shows up a custom context menu in the map, which can be customized to show your text and can be linked to your URL. For e.g., you can set the context menu of the chart to include "About your company name" and then link to your company home page. By default, the chart shows "About FusionMaps " when right clicked.
aboutMenuItemLabel String   The menu item label for the custom context menu item.
aboutMenuItemLink String URL Link for the custom context menu item. You can specify the link in FusionMaps link format to be able to open the same in new window, pop-ups, frames or as JavaScript links.
Back to Top

Map Cosmetics
The following attributes let you configure map cosmetics like background color, background alpha etc.

Attribute Name Type Range Description
showCanvasBorder Boolean 1/0 Whether to show a border around entire map object.
canvasBorderColor Color Hex Code If you've opted to show a border around entire map object, this attribute lets you control the color of the border.
canvasBorderThickness Number In Pixels If you've opted to show a border around entire map object, this attribute lets you control the thickness of the border in pixels.
canvasBorderAlpha Number 0-100 If you've opted to show a border around entire map object, this attribute lets you control the alpha of the border.
bgColor Color This attribute sets the background color for the map. You can set any hex color code as the value of this attribute.
bgAlpha Number 0-100 Sets the alpha (transparency) for the background.
bgRatio Number 0-100 If you've opted for a gradient background, this attribute lets you set the ratio of each color constituent.
bgAngle Number 0-360 Angle of the background color, in case of a gradient.
bgSWF String To place any Flash movie as background of the map, enter the (path and) name of the background SWF. It should be in the same domain as the map.
bgSWFAlpha Number 0-100 Helps you specify alpha for the loaded background SWF.
logoURL String URL You can load an external logo (JPEG/PNG/SWF) on the map once it has rendered. This attribute lets you specify the URL of the same. Owing to Flash Player security settings, you can only specify logo that are on the sub-domain as the SWF file of the chart.
logoPosition String TL, TR, BL, BR, CC

Where to position the logo on the map:

  • TL - Top-left
  • TR - Top-right
  • BR - Bottom right
  • BL - Bottom left
  • CC - Center of screen
logoAlpha Number 0-100 Once the logo has loaded on the map, you can configure its opacity using this atribute.
logoScale Number 0-300 You can also change the scale of externally loaded logo at run-time by specifying a value for this parameter.
logoLink String URL If you want to link the logo to an external URL, specify the link in this attribute. The link can be in FusionMaps link format, allowing you to link to new windows, pop-ups, frames etc.
Back to Top

Map Entities Cosmetics
These attributes let you configure how your entities would appear on the map.

Attribute Name Type Range Description
borderColor Color Hex Code Border Color for map entities
borderAlpha Number 0-100 Border alpha for map entities
fillColor Color Hex Code Default fill color to use for entities, if no color range has been specified.
fillAlpha Alpha 0-100 Alpha to be used for filling entities.
connectorColor Color Hex Code If there are any label connector lines on the map, this attribute lets you choose its color.
connectorAlpha Number 0-100 If there are any label connector lines on the map, this attribute lets you choose its alpha.
useHoverColor Boolean 0/1 Whether to use hover color for the map. If set to yes, whenever the end user hovers his mouse over a map entity, it will change its color to the color defined in attribute below.
hoverColor Color Hex Code When the end user hovers his mouse over any map entity, it changes its color. Using this attribute you can define that color.
Back to Top

Number Formatting
Using the attributes below, you can control a myriad of options like:
  • Formatting of commas and decimals
  • Number prefixes and suffixes
  • Decimal places to which the numbers would round to
  • Scaling of numbers based on a user defined scale
  • Custom number input formats

  • Attribute Name Type Range Description
    formatNumber Boolean 0/1 This configuration determines whether the numbers displayed on the map will be formatted using commas, e.g., 40,000 if formatNumber='1' and 40000 if formatNumber='0 '
    formatNumberScale Boolean 0/1 Configuration whether to add K (thousands) and M (millions) to a number after truncating and rounding it - e.g., if formatNumberScale is set to 1, 1043 would become 1.04K (with decimals set to 2 places). Same with numbers in millions - a M will added at the end. For more details, please see Advanced Number Formatting section.
    defaultNumberScale String The default unit of the numbers that you're providing to the map. For more details, please see Advanced Number Formatting section.
    numberScaleUnit String Unit of each block of the scale. For more details, please see Advanced Number Formatting section.
    numberScaleValue String Range of the various blocks that constitute the scale. For more details, please see Advanced Number Formatting section.
    numberPrefix String Character Using this attribute, you could add prefix to all the numbers visible on the map. For example, to represent all dollars figure on the map, you could specify this attribute to ' $' to show like $40000, $50000. For more details, please see Advanced Number Formatting section.
    numberSuffix String Character Using this attribute, you could add suffix to all the numbers visible on the map. For example, to represent all figure quantified as per annum on the map, you could specify this attribute to ' /a' to show like 40000/a, 50000/a. For more details, please see Advanced Number Formatting section.
    decimalSeparator String Character This option helps you specify the character to be used as the decimal separator in a number. For more details, please see Advanced Number Formatting section.
    thousandSeparator String Character This option helps you specify the character to be used as the thousands separator in a number. For more details, please see Advanced Number Formatting section.
    inDecimalSeparator String Character In some countries, commas are used as decimal separators and dots as thousand separators. In XML, if you specify such values, it will give a error while converting to number. So, FusionMaps accepts the input decimal and thousand separator from user, so that it can covert it accordingly into the required format. This attribute lets you input the decimal separator. For more details, please see Advanced Number Formatting section.
    inThousandSeparator String Character In some countries, commas are used as decimal separators and dots as thousand separators. In XML, if you specify such values, it will give a error while converting to number. So, FusionMaps accepts the input decimal and thousand separator from user, so that it can covert it accordingly into the required format. This attribute lets you input the thousand separator. For more details, please see Advanced Number Formatting section.
    decimals Number 0-10 Number of decimal places to which all numbers on the map would be rounded to.
    Back to Top

    Font Properties
    Using the attributes below, you can define the generic font properties for the text on the map.

    Attribute Name Type Range Description
    baseFont String Font Name This attribute lets you set the font face (family) of all the text (data labels, values etc.) on map. If you specify outCnvBaseFont attribute also, then this attribute controls only the font face of text within the map canvas bounds.
    baseFontSize Number 0-72 This attribute sets the base font size of the map i.e., all the values and the names in the map which lie on the canvas will be displayed using the font size provided here.
    baseFontColor Color This attribute sets the base font color of the map i.e., all the values and the names in the map which lie on the canvas will be displayed using the font color provided here.
    Back to Top

    Attributes to allow saving of map as image
    These attributes allow you to control the saving of map as image.

    Attribute Name Type Range Description
    imageSave Boolean (0/1) Whether to allow exporting of the map as image?
    imageSaveURL URL   Path of the image saving script. This path has to be relative to the map and should be on the same sub domain as the map.
    imageSaveDialogColor Color Sets the color of the dialog box which the user sees while the pixels of the map is being captured. By default, a white dialog is shown when the user intiates the export.
    imageSaveDialogFontColor Color   Sets the font color of the dialog box which the user sees while the pixels of the map is being captured.
    Back to Top

    Marker Properties
    Markers are custom defined points on the map, which help you pin-point locations like cities, houses, malls, junctions etc. Using the properties listed below, you can configure the various aspects of the markers.

    Attribute Name Type Range Description
    markerFont String Font Name This attribute sets the font face for all the defined marker labels. You can over-ride this using STYLES.
    markerFontSize Number 0-72 This attribute sets the font size for all the defined marker labels on the map. You can over-ride this using STYLES.
    markerFontColor Color   This attribute sets the font color for all the defined marker labels on the map. You can over-ride this using STYLES.
    showMarkerToolTip Boolean 0/1 Whether to show tool tips for the defined markers?
    showMarkerLabels Boolean 0/1 You can opt to show/hide label for all the makeres on the chart using this attribute.
    markerLabelPadding Number Pixels This attribute lets you set a global label padding between the marker icon and its label. You can later over-ride the label padding for each individual marker too.
    markerBgColor Color   This attribute lets you set a common background color for all the defined markers on the map. You can later over-ride individual marker colors by using SHAPE definitions.
    markerBorderColor Color This attribute lets you set a common border color for all the defined markers on the map. You can later over-ride individual marker border colors by using SHAPE definitions.
    markerRadius Number Pixels This attribute lets you set a common radius for all the defined markers on the map. You can later over-ride individual marker border colors by using SHAPE definitions.
    markerConnThickness Number Pixels If you've defined any marker connectors, this attribute lets you set the thickness of all those connectors.
    markerConnColor Color   Color for all marker connectors.
    markerConnAlpha Number 0-100 Alpha for all marker connectors.
    markerConnDashed Boolean 0/1 Whether the marker connector line should appear as dashed?
    markerConnDashLen Number Pixels If marker connector line is to appear as dash, this attribute lets you set the dash length of each part of dash.
    markerConnDashGap Number Pixels If marker connector line is to appear as dash, this attribute lets you set the dash gap of each part of dash.
    Back to Top

    Tool-tip
    These attributes let you control the tool tip. You can set the background color, border color, separator character and few other details.

    Attribute Name Type Range Description
    showToolTip Boolean 0/1 Whether to show tool tip on map?
    toolTipBgColor Color Background Color for tool tip.
    toolTipBorderColor Color Border Color for tool tip.
    toolTipSepChar String The character specified as the value of this attribute separates the name and value displayed in tool tip.
    showToolTipShadow Boolean 0/1 Whether to show shadow for tool-tips on the map.
    Back to Top

    Map Padding & Margins
    The following attributes help you control map margins and paddings.

    Attribute Name Type Range Description
    legendPadding Number In Pixels Padding of legend from right/bottom side of map
    mapLeftMargin Number In Pixels Amount of empty space that you want to put on the left side of your map. Nothing is rendered in this space.
    mapRightMargin Number In Pixels Amount of empty space that you want to put on the right side of your map. Nothing is rendered in this space.
    mapTopMargin Number In Pixels Amount of empty space that you want to put on the top of your map. Nothing is rendered in this space.
    mapBottomMargin Number In Pixels Amount of empty space that you want to put on the bottom of your map. Nothing is rendered in this space.
    Back to Top

    Legend Properties
    If you've defined color ranges, the color range names appear in a legend. You can place the legend at the bottom of the map or to the right of the map.

    Also, using the attributes below, you can configure the functional and cosmetic properties of the legend.

    Attribute Name Type Range Description
    showLegend Boolean 0/1 Whether to show legend for the map?
    legendCaption String   Lets you add a caption to your legend.
    legendPosition String BOTTOM or RIGHT The legend can be plotted at two positions on the map - below the map (BOTTOM) and on the RIGHT side of the map.
    legendBgColor Color Hex Code Background color for the legend.
    legendBgAlpha Number 0-100 Background alpha for the legend.
    legendBorderColor Color Hex Code Border Color for the legend.
    legendBorderThickness Number In Pixels Border thickness for the legend.
    legendBorderAlpha Number 0-100 Border alpha for the legend.
    legendShadow Boolean 0/1 Whether to show a shadow for legend?
    legendAllowDrag Boolean 0/1 The legend can be made drag-able by setting this attribute to 1. End viewers of the map can drag the legend around on the map.
    legendScrollBgColor Color Hex Code If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the background color of the scroll bar.
    legendScrollBarColor Color Hex Code If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the bar color of the scroll bar.
    legendScrollBtnColor Color Hex Code If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the color of buttons of the scroll bar.
    reverseLegend Boolean 0/1 You can reverse the ordering of datasets in the legend by setting this attribute to 1.
    Back to Top