I have been playing around with using
Modest Maps in Flex. Simple demo
here.
This is a noddy demo I put together to try out the Flex map from
MM.
Running under FlexBuilder I have noticed an annoying issue with the markers sliding off the edge of the map container panel and moving behind the datagrid. Interestingly the deployed version doesn't seem to show it. Could just be IE6 but I am mystified why!
Features
Use of Flex Modest Map
OpenStreetMap layer to avoid having to use a key.
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.
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. The marker code is a Flex 'Sprite'. I got this code from the MM forum so it is as simple as can be i.e a yellow square. You can make this into anything you like.
This uses a sample data set from the BBC traffic feed. My home town of Glasgow is featured. I live to the north of the city.
Flex builder project in zipped form
here.
Note the project uses the Flex corelib.swc. This is to make the parsing of the dates from the XML work.
Feel free to take this code and turn it into something cool.