When trying to make a map using FusionMaps, 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:

  • Basic Troubleshooting - Manual problem solving methods.
  • Using the Debug Mode - We'll cover this in next page.

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:

 
SWF Movie not Loading or No map shown

When viewing your page containing the map, 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:

  • Check if the SWF path is properly provided in your HTML page is correct. Also, check if the SWF file actually exists there.
  • If you're working on a case-sensitive file system Operating System, check for the case of path and SWF file.
  • Check if you've Adobe Flash Player 8 (or above) installed on your machine.
  • Check whether you've enabled your browser to show ActiveX controls. Normally, all browsers are Flash-enabled.
"Error in Loading Data" message

If you get a "Error in Loading Data" message in your map, it means that FusionMaps could not find XML data at the specified URL. In that case, check the following:

  • Check if you've actually provided dataURL or dataXML. If you do not provide either, FusionMaps looks for a default Data.xml file in the same path. However, if that is also not found, it shows the "Error in Loading Data" error.
  • If you're using dataURL method, paste this URL in your browser to check if it's returning a valid XML. Make sure there are no scripting or time-out errors and a valid XML is being returned. Also make sure that the XML isn't intermingled with HTML content. The data provider page should return clean XML only - not even HTML <head> or <body> tags.
  • If you've to pass parameters to your dataURL data provider page from FusionMaps, make sure they're URLEncoded in the dataURL, when providing to FusionMaps. e.g., if your dataURL needs to be Data.asp?id=43&subId=454, you'll need to URL Encode it so that it becomes Data%2Easp%3Fid%3D43%26subId%3D454. Only then FusionMaps will invoke the URL with proper parameters appended to it.
  • When using dataURL method, make sure that the SWF File and data provider page are on the same sub-domain. Due to Flash's sandbox security model, it cannot access data from external domains, unless otherwise configured.
"Invalid XML Data" message

If you get an "Invalid XML Data" message, it means that the XML data document 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 dataXML method, % needs to be encoded as %25, & as %26 and so on. In dataURL method, you can provide most of the characters directly, without the need to encode.
  • In dataXML 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.

Next, we'll see how to use the Debug Window to trouble shoot.