Tuesday, February 5, 2008

Yahoo Aerial Map

I've been interested for some time in how to grab Yahoo map tiles. Starting with a lat long envelope how do we find the relevant tiles and display them? Further how do we pan, zoom and add overlays. Modest maps do a nice job using various providers (openstreemap, google etc). But working through their code base has proved, even for experienced developers, somewhat challenging. I decided to build from scratch a simple Flex 2 map viewer using Yahoo Aerial tiles. The results can be viewed at:

http://www.flexmappers.com/yahoo_maps/

Its mostly a proof of concept; pan and centred zooms still need some work. But it proved a much easier task than expected. Flex simply calculates the tiles needed, requests these tiles and displays them in a Sprite grid. Overlays are added to individual tile sprites after calculating the tile and pixel position within the specific tile.
--Matt

No comments: