Flex: Modest Maps Demo

I have been playing around with using Modest Maps in Flex. This is a Flash mapping solution which sits over existing providers of map tiles like Google, Yahoo etc.

Simple demo here.

Features

  • Use of Flex Modest Map.
  • OpenStreetMap layer.
  • Nice slider for zooming in and out.
  • I have had to modify the Flex ‘map.as’ file to add a ‘commitProperties’ method to get this to work. It seems to be missing this. Right click on the demo to ‘View Source’ or download the FlexBuilder project to get this modified version here.

  • Tooltips.
  • Markers with user definable icon.
  • The icon is embedded into the EventMarker class but could easily be passed as a parameter.

  • HTTPRequest to fetch XML.
  • E4X Parser to extract information from XML nodes.
  • Grid to hold traffic events.
  • Click on an item and it is centred in the map.

  • Marker event handler.
  • Click on a marker and it is highlighted in the grid.

    This uses a some sample data I collected from the BBC traffic feed for Strathclyde and in particular Glasgow.

    Flex builder project in zipped form here.

    If you have questions about the Modest Maps API then best place is to go here.

    Update

    I have updated the demo and source with changes to implement the selection of icon based on the traffic event severity.

    Comments

    Leave a Reply