Starting v3.0.5, FusionMaps can export maps as images. To export a map as image, all you need to do is configure the setup using code provided by us and then right click on map and select Save as Image.

This is done using a combination of FusionMaps and server side scripting, as Flash Player doesn't support exporting to images natively. The following processes take place when the map is to be exported as image:

  1. First, the map renders at client side using the XML data provided. In the XML data, you configure whether the map would allow exporting of images. If yes, you can configure the script path and few cosmetic properties.
  2. When the user right clicks on the map and selects "Save as Image", the map takes a snapshot of itself, compresses it and sends to the specified server side script.
  3. The server side scripts reads this data, decompresses it, builds an image and returns it.

In the download package, we've provided server side script for image saving in 5 languages - ASP.NET, PHP, JSP, ColdFusion and Perl, as all these technologies natively support server side image generation. If you intend to use PHP, you need to make sure that GD is installed and enabled. You can implement these scripts in other languages too using help of third party image generation components.

In the next section, we'll see how to set it up.