Accessibility

Table of Contents

Recreating MapCache on Adobe AIR

Building the HTML page

The first step in getting a Yahoo! Maps application running in Adobe AIR is to build an HTML page that uses the API. You can build this first part in the browser using your favorite development and debugging tools. The basic Yahoo! Map is assembled by providing a DIV for the map, including the API script block, and then instantiating a map instance. There's a number of additional methods you can call to further customize the look and feel of the map.

<script src="http://api.maps.yahoo.com/ajaxymap?v=3.4&appid=YOUR_MAP_ID" type="text/javascript"></script>
<script type="text/javascript">
function doLoad()
{
  map = new YMap( document.getElementById( 'map' ) );
  map.addTypeControl();
  map.addPanControl();
  map.addZoomShort();
  map.drawZoomAndCenter( HOME_GEO, 8 );
}
</script>
...
<div id="mapholder" class="box">
  <div id="map"></div>
</div>

Although at this point you're still authoring for the browser, don't forget to provide user interface controls for the various operations the application will provide when on the desktop. For this application you'll want to have buttons for save, copy, and drag. These buttons will invoke saving an image of the map to disk, placing a copy of an image of the map on the clipboard, and providing a means to drag an image of the map to the desktop (or other application).