Why do extra work? When looking at what kind of APIs Yahoo maps offers for developers, I came across their Flex API and was absolutely stunned at how easy it might be to add them in. Unfortunately the current Flex API only supports up to Flex 1.5, which is completely different from Flex 2.0 (1.5 runs server side and has to be installed on the server, 2.0 compiles to swf files which run independently). i’ll be keeping an eye on this for when they do release the Flex 2.0 version, as by then I might have advanced beyond the novice stage. The Flex 1.5 api allows for a very quick way of adding maps:
1 2 3
<yahoo:YahooMap id="myMap" width="550" height="400" zoomLevel="3" latitude="37.77159" longitude="-122.401714" />
Along with some easy ways to add single points to the map. In searching for a way to implement maps now though, I came across a wonderful example on inserting Yahoo! maps in a Flex 2 application complete with a working example . I have to say, it’s developer support like this that make things fun when you’re first getting started.
Admittedly, I’ve cheated with the maps integration up to this point by using this, but should be a good intro to how they work. Tomorrow I’ll probably add some kind of feature to
clear previously clicked on items from the map (probably whenever a new filter() occurs) as well as have a new option in the filter section to “map results” which would add all the filter results to the map, although I’ll probably need some kind of a limit. What impresses me most about this is the speed at which the map reacts.