Basic Troubleshooting

When trying to make a map using FusionMaps XT, if you get any errors (or if the map doesn't render), there could a lot of reasons for it. Here, we'll try and cover them up. We've divided the entire debugging process into two sections:

  1. Basic Troubleshooting - Manual problem solving methods
  2. Advanced Troubleshooting - Answers to the common issues faced
  3. Using the Flash Debug window - Flash maps provide a Debug Window Mode, which helps you un-earth the problems with your Flash maps
  4. Using the FusionCharts JavaScript class - Mechanism to debug maps using JavaScript events and error handlers.

Let's get to basic trouble shooting first. While creating your map, if for some reasons you do not see your map like it should, check for the following actions:

If you do not see any map at all

If you see an endless loading progress bar in your browser, or if the right click menu (right click at the place where the map is supposed to be) shows "Movie not loaded", check the following:

  • Have you pasted the map SWF and JavaScript files (FusionCharts.js, FusionCharts.HC.js, FusionCharts.HC.Maps.js and jquery.min.js) in the required folder?
  • Have you provided the name and path of the map SWF and JavaScript files properly in your code?

If you get a "Error in Loading Data." message, check the following:
    • Whether you've provided proper path to the XML/JSON data in your code.
    • Whether your XML/JSON file is named properly and not having a .txt extension (as many basic text editors append .txt after the file name).
    • If you're using an operating system that uses case-sensitive naming for file system (like mac, linux etc.), check for the names of your XML/JSON and map file.
    • Whether your map files (SWF and JavaScript) and XML/JSON data are on the same domain or same sub-domain. Cross domain data loading is not allowed.
 
If you get an "Invalid Data." message, it means that the XML/JSON data is malformed. Check it again for common errors like:
  • Difference in case of tags. <map> should end with </map> and not </Map> or </MAP>
  • Missing opening/closing quotation marks for any attributes. e.g., <entity displayValue=NA' should be <entity displayValue='NA'
  • Missing closing tag for any element.
  • If you're using any special characters in your XML, make sure they're properly encoded. Like, in Data String method, % needs to be encoded as %25, & as %26 and so on. In Data URL method, you can provide most of the characters directly, without the need to encode.
  • In Data String method, check for conflict of ' (XML Attribute Character) and " (HTML Parameter Character). For example, if you're using direct HTML embedding method, and using " for HTML parameters, then you need to make sure that all your XML attributes use ' as containers. Example: <param name="FlashVars" value="<map showLabels='1' showValues='1'>...</map>" />
  • If you've quotes as part of your data, XML Encode them to &apos; Example: <entity displayValue ='John&apos;s House' />
  • To get more information on what the error in XML is, you can either use the Debug Window (explained next) or open the XML in your browser.
 
If you get a screen showing "The map will appear within this DIV..." or "Map." or "FusionMaps XT will load here", check if:
  • You've copied FusionCharts.js, jquery.min.js, FusionCharts.HC.js and FusionCharts.HC.Maps.js in the right folder.
  • You've included and provided the correct path of FusionCharts.js in your HTML code.
  • There are any JavaScript syntax or runtime errors that might have halted the execution of FusionCharts APIs.
  • Unique names are used for the map's JavaScript variable, map's ID and the HTML DIV's ID?

    To provide cross-browser compatibility, we recommend you not to start the ID with a numerical value, nor use space as part of the ID.

If you get a "... is not a function of ..." error when using any JavaScript API of the map, make sure that:
  • Make sure that you're not calling the JavaScript method before the map has loaded and rendered. You need to use FC_Rendered function or define event listener for Rendered event of map to track the loading of map as explained in the FusionMaps XT and JavaScript section.
  • Make sure that you're NOT running the map from local file system (C:\ , D:\). Instead, run the map from behind a server (localhost - IIS, Apache etc.). This is because the Flash Player security settings do not allow the map to interact with JavaScript on local file system by default, unless otherwise specifically set. Still if you want to run the map from local file system, you need to set up the Flash Player Global Security settings. To know more on how to set up click here.