IntroThis project builds on the ModestMaps open source API (http://modestmaps.com/) for presenting tiled maps in Actionscript 3.0 programs. Based on the current trunk version of modestmaps as of 6/19/08.
The API has been extended to include a PolylineOverlay class that draws a polygon on the map from a given set of lat/lon points. Each instance of PolylineOverlay has an optional fill color and associated marker label that is centered at a point (centroid) that the programmer specifies for the region.
Also includes an OverlayManager class that simpifies the creation and management of overlays, a PolylineMarker class to label the PolylineOverlay regions, and an OverlayEvent that is dispatched whenever a PolylineOverlay is clicked.
API Documentationasdoc output covering the complete Modestmaps library and PolylineOverlay extensions can be found at:
SummaryMap -- modified from ModestMaps original to include an instance of OverlayManager (package com.modestmaps). Overlay -- modified from Modestmaps original to add support for PolylineOverlay and OverlayManager (package com.modestmaps.extras). TileGrid -- modified from ModestMaps original to expose private well var as a property (package com.modestmaps.core). Enables PolylineOverlay to trap mouse clicks and propagate them to the TileGrid for map panning. PolylineOverlay -- new (com.modestmaps.extras). OverlayManager -- new (com.modestmaps). PolylineMarker -- new (com.modestmaps.core). OverlayEvent -- new (com.modestmaps.events). DemoA sample program demonstrates the use of modestmaps with PolylineOverlays. The program displays polygons for 11 different zipcodes covering central San Diego, CA. Each polygon is shaded with a random color, and labeled with the zipcode and a median housing price for that zip. For the demo, data is read from a set of xml datafiles.
Get the demo code at the downloads page, file MMPolylineDemo062308.zip Open FlexBuilder 3 Import project from the zipfile
SourceMain trunk http://modestmaps-custom.googlecode.com/svn/trunk is a copy of the modestmaps trunk as of 6/19/08. ModestMaps with PolylineOverlay extensions is at http://modestmaps-custom.googlecode.com/svn/branches/polyline DownloadsUTModestMaps061908.zip contains a zip of the ModestMaps AS3 library with PolylineOverlay extension... DEPRECATED -- checkout source from Subversion instead MMPolylineDemo.zip contains a sample Flex project and data files demonstrating how to use the PolylineOverlay extensions. Includes the ModestMaps library (with polyline extensions) as a .swc, compiled with Flex 3.