MapSnap: An Apollo Example Application

MapSnap was one of the first Apollo applications I wrote which incorporates HTML. It lets you look up addresses on a Yahoo map, and save the maps as a PNGs to your desktop. It’s a very simple application, but I think it makes for an excellent example.

MapSnap demonstrates the following:

  • The general structure of an Apollo application.
  • The use of system chrome.
  • Stopping a window from resizing.
  • Loading local HTML content.
  • Script bridging (calling into JavaScript from ActionScript).
  • Encoding a PNG.
  • Including an icon in your Apollo application.
  • Using a native file browser (the technique I use in MapSnap is a hack, but it will get you through until we officially add this functionality to Apollo).

If you just want to run the app, all you need is the Apollo runtime, and the MapSnap AIR file. If you want to see the source code, here is the Flex Builder project. There’s a lib directory in the project with corelib.swc in it which you need to link in to your project in order to get the PNG encoding support.