FusionMaps XT uses FusionCharts JavaScript Class that takes care of all the products of FusionCharts Suite XT including FusionMaps XT.

FusionCharts JavaScript Class API provides a number of properties. The list below shows details on each property:

API Properties Description Example
FusionCharts class - static properties
version This returns the version of FusionCharts JavaScript Class
FusionCharts.version
items This Array contains references to all the map instances in a page. Using this, you can get the reference of a map object. A reference of a map is necessary to perform all the available functions, use all the available properties and listen to events.

When a map-id is passed, it tries to return (if available) the reference of the instance of the FusionCharts object.

This is the same as FusionCharts() static function which also provides the reference of the map object.
FusionCharts.items["myMapId"]
printManager This is an Object which configures the FusionCharts Print Manger. Click here to know about the functions available in this Object.  
debugMode This is an Object which sets the debugMode of FusionCharts JavaScript Class. Click here to know about the functions available in this Object.  
 
FusionCharts class - instance properties
id Id of the map. This is commonly called the DOMId of the map.
myMap.id
width Width of the map
FusionCharts.items["myMapId"].width
height Height of the map
FusionCharts.items["myMapId"].height
src Path of the map SWF file
FusionCharts.items["myMapId"].src
Details

From the FusionCharts JavaScript Object you can get a lot of information about the map instance as well as the JavaScript class. Let's quickly go though the information:

FusionCharts.version

This static property of FusionCharts class returns an indexed array containing version information of FusionCharts JavaScript Class. The information comes in the format - [major, minor, revision, identifier, build ]. This is only applicable in FusionCharts JavaScript Class.

var FCJSMajorVersion = FusionCharts.version[0]; // returns the major version number i.e., 3 
var FCJSbuild = FusionCharts.version[4]; // returns the build number

FusionCharts.items[]

This static property contains an array of the references of all the maps present in a page. It is a normal JavaScript Object which can be iterated using for(var maps in FusionCharts.items). Each object in items has a string key to identify the map object reference it stores. The key value is same as the map's Id or DOMid. Hence, you can access each map object from this array using standard JavaScript access methods. For example:

var mapReference = FusionCharts.items["myMapId"];

chartJSInstance.id

This property of FusionCharts JavaScript Object returns the DOMId of the map as String. This is only applicable to FusionCharts JavaScript object.

var mapId = myMap.id;

chartJSInstance.width

This property of FusionCharts JavaScript Object returns the width of the map. It returns value either in percentage or in pixels. This is only applicable to FusionCharts JavaScript object.

You can also set value for this property. But you will need to call the resizeTo() function to get the change reflected on the map.

var mapWidth = FusionCharts("myMapId").width; //gets current width

FusionCharts("myMapId").width = "80%";
FusionCharts("myMapId").resizeTo( , "100%" ); // sets map's width to 80% and height to 100% 

chartJSInstance.height

This property of FusionCharts JavaScript Object returns the height of the map. It returns value either in percentage or in pixels. This is only applicable to FusionCharts JavaScript object.

You can set also value for this property. But you will need to call resizeTo() function to get the change reflected on the map.

var mapHeight = FusionCharts("myMapId").height;//gets current height 

FusionCharts("myMapId").height = "60%";
FusionCharts("myMapId").resizeTo( "50%" ); // sets map's height to 60% and width to 50%

chartJSInstance.src

This property of FusionCharts JavaScript object returns the path or URL of the map SWF file as String. This is only applicable to FusionCharts JavaScript object.

var mapSrc = FusionCharts("myMapId").src;