All maps in the FusionMaps XT support drill-down functionality.  This means that you can convert individual entities, markers and connectors or the whole map into hotspots (or links). These items, when clicked, can open URLs, call JavaScript functions or load LinkedCharts.

Broadly, drill-down feature can be divided into two types:

  1. Simple links : Drill-down to open simple URLs or call JavaScript functions (present on same page)
  2. Map links (LinkedCharts): Drill-down to detailed LinkedCharts

Using FusionMaps XT, you can create endless levels of drill-down. It has been kept very generic to accommodate all types of requirements.

Code examples discussed in this section are present in Download Package > Code > DrillDown folder.

Using Simple Links

Using Simple links, you can provide a URL for the linked page (or JavaScript function) for each entity, marker and connectors. Simple links can be in various formats:


Creating simple links using XML

You can convert a data plot into a link simply by introducing the link attribute into the <set> element. Here is an example:

<map borderColor='005879' fillColor='D7F4FF' numberSuffix='M' includeValueInLabels='1' labelSepChar=': ' baseFontSize='9'>
   <data>
      <entity id='NA' value='515' link='DemoLinkPages/DemoLink1.html'/>
      <entity id='SA' value='373' link='DemoLinkPages/DemoLink2.html'/>
      <entity id='AS' value='3875' link='DemoLinkPages/DemoLink3.html'/>
      <entity id='EU' value='727' link='DemoLinkPages/DemoLink4.html'/>
      <entity id='AF' value='885' link='DemoLinkPages/DemoLink5.html'/>
      <entity id='AU' value='32' link='DemoLinkPages/DemoLink6.html'/>
</data>
</map>

The links defined in the XML exemplify all the simple link types like simple URL, URL in new page, frame, popup, and JavaScript.

Creating links using JSON

Similarly if you are using JSON data instead of XML, you must add the link property to the data object in the following way:

{
  "map": {
    "bordercolor": "005879",
    "fillcolor": "D7F4FF",
    "numbersuffix": "M",
    "includevalueinlabels": "1",
    "labelsepchar": ": ",
    "basefontsize": "9"
  },
  "data": [
    { "id": "NA", "value": "515", "link": "DemoLinkPages/DemoLink1.html" },
    { "id": "SA", "value": "373", "link": "DemoLinkPages/DemoLink2.html" },
    { "id": "AS", "value": "3875", "link": "DemoLinkPages/DemoLink3.html" },
    { "id": "EU", "value": "727", "link": "DemoLinkPages/DemoLink4.html" },
    { "id": "AF", "value": "885", "link": "DemoLinkPages/DemoLink5.html" },
    { "id": "AU", "value": "32", "link": "DemoLinkPages/DemoLink6.html" }
  ]
}

Using LinkedCharts

This is an easy way of building drill-down maps, where detailed maps can be made to replace the parent map or, open up in a separate dialog. The feature also allows configuration of drill-down maps from a single data source. The process has been explained in details in next page.