Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Yahoo!’s new twist on mapping APIs

One of the most exciting things I’ve seen at Yahoo! since starting here has finally been made public: the new Yahoo Maps. The map application itself differs from many other recent map sites in being rendered entirely in Flash. This leaves far more scope for interface niceties, but doesn’t it reduce the scope for hacking that made things like Google Maps so much fun?

Not at all. The maps team have produced a set of APIs that should make any geo-hacker very happy indeed. Take a look at these, all launched today:

  • Flash-ActionScript API, for embedding maps in your Flash applications. When you think about the number of talented Flash developers out there for whom an Ajax toolkit is of little interest, the potential for innovation here is enormous. Not to mention that custom vector overlays of map information are far better suited to Flash than to JavaScript.
  • Flash-JavaScript API, for embedding Flash maps within normal pages and driving them from regular JavaScript. You can also drop custom Flash widgets and markers in to the page from this API just by providing the URL of a SWF file, which should allow ActionScript programmers to achieve virtually anything they can imagine.
  • Flex API, for adding maps to Flex applications. I’m don’t know too much about Flex (which is billed by Macromedia as an “enterprise” development tool), but the syntax example is pretty compelling: <yahoo:YahooMap id="myMap" width="550" height="400" zoomLevel="3" latitude="37.77159" longitude="-122.401714" />
  • Don’t like Flash? There’s an Ajax JavaScript API as well, no Flash required. Create pannable, zoomable maps, drive them from JavaScript and add custom markers to them.

That’s the core APIs relating to maps, but geo-hackers will be pleased to hear about some of the related API and API improvements that have also been rolled out:

  • A Geocoding API. Geocoding is when you take an address (or partial address) in text format and turn it in to a latitude/longitude point or set of possible matches.
  • A Map Image API, which gives you direct access to the tile servers. Specify a point or address and some dimensions and get back a custom generated map image. This means you can build a mapping application without any client side scripting at all, or alternatively roll your own panning/zooming code in any language or platform you can think of.
  • A new version of the Local Search Web Service, which now returns specific location information as a lat/long pair.
  • A traffic API, providing traffic alert information for the location you specify. Again, lat/long is included.

I think you’ll agree that this is all extremely exciting stuff. You can see some of the applications people have already built with it in the applications gallery. I’m sure there will be plenty more added over the next few weeks as creative people (especially Flash developers who haven’t had access to tools like this before) get their teeth in to the new APIs.

Before I get your hopes up too much though, there are a few significant features that are currently missing from the current set of mapping tools.

  • It’s US only at the moment. This really sucks for the rest of the world. Personally I’d love to see at least country outlines added as soon as possible.
  • No aerial photos or satellite images.
  • There’s a slightly odd restriction on using the APIs for “real time” applications. My guess is that this is related to the license under which the map data itself has been procured, to protect someone else’s business model. On further reading, it seems that the Google Maps API has the same restriction.

This is Yahoo!’s new twist on mapping APIs by Simon Willison, posted on 3rd November 2005.

Tagged , , ,

View blog reactions

Next: Social engineering and Orange

Previous: Taking charge of your own destiny

19 comments

  1. Some nice things there - I particularly like the draggable 'preview' of the surrounding area. However it seems that Javascript has a massive speed advantage in this area - I personally would have thought that that flash would be faster but it's simply not.

    Also in IE it appears to redirect you away from the Beta whenever you try to access it...

    I'll still be using Google for my maps I'm afraid, maybe with a few speed optimizations this might be more usable.

    Andrew Phillipo - 3rd November 2005 11:55 - #

  2. I was also very suprised at the slowness.

    rjwittams - 3rd November 2005 13:22 - #

  3. Very neat stuff, the Upcoming mashup is so so cool. Make sure you get them working on the UK maps!

    Tom - 3rd November 2005 13:41 - #

  4. Simon, not only the US. It also has Canadian maps.

    DD - 3rd November 2005 13:43 - #

  5. This is quite a welcome development!

    I agree with the previous commenters, though, that it seems slow. I'm sure you ("you" as in Yahoo or maybe even Simon himself) will work on improving that.

    Also, any chance Yahoo will pretty-up its maps? This is subjective, but Google Maps are much prettier.

    The tile API is quite interesting. What I'd like to see is for Yahoo to host custom tiles for me. I've wanted to add custom tiles to chicagocrime.org, but the server load would just be too much. Ideally, a developer could upload a gigantic image and Yahoo would do the slicing, dicing and serving.

    The use restriction (50,000 queries per IP per day) seems adequate. What does "non-commercial use" mean, though? Can I use the Yahoo maps API on pages that have ads on them?

    Adrian Holovaty - 3rd November 2005 15:38 - #

  6. Crashed and burned in Firefox on Linux.

    Stephen Downes - 3rd November 2005 18:58 - #

  7. These were quite some spectacular maps indeed and have been in development for quite some time. One at a time we're taking back what was ours :)

    Dustin - 3rd November 2005 19:16 - #

  8. I've just got used the google maps api so I doubt If ill get the chance to use it at work. But as a user I'll use it just for that great little viewing pane in the corner. Very usefull.

    Rob Winters - 3rd November 2005 22:13 - #

  9. Hi, Andrew, RJ, Adrian -- I'm trying to reconcile these specific "slow" posts with the others who say "fast". Could you help me see the pattern of whether it's server requests or a specific local action, what it is that makes the difference for you, please?

    http://weblogs.macromedia.com/jd/archives/2005/11/ slow_maps.cfm

    (Stephen, "Linux" varies, particularly for richer data... good diagnostics include whether it happens twice, whether other content displays normally in that configuration, etc.)

    jd/mm

    John Dowdell - 4th November 2005 04:37 - #

  10. I think that the use of the scroll wheel for zooming is nice, I was dissapointed when google maps didnt support it.

    The preview is not useful ( it is cute ), as it doesnt live update the map data. I do like the shape of the zoom scroll bar. Ive just been doing some UI work on using 'elastic' shape graphics to convey 'force'.

    I had hoped that with a flash based map vector graphics would be used. They could still be LOD'd and loaded on demand.

    The tiles arent predictively loaded, or at least not as far as I can see.

    My single biggest complaint is with the smooth zoom. Its a neat trick, but the software the renders the tiles moves map elements around on different LOD levels. I find it quite disconcerting, and it took me a while to put my finger on it. I think the map renderer should layout the full detail map, and the remove the elements for smaller LODs without moving anything.

    Finally, I dont think it really brings anything significant to the table. The UI isnt better than Google's ( I couldnt even work out how to make a search result into a waypoint ). It doesnt let you place arbitrary waypoints. It ends up on a par with Google's effort, a little better in some regards, a little worse in others, nice to see it in flash, but in no way the huge improvement that Google presented over earlier map efforts.

    Jon Hart - 5th November 2005 00:19 - #

  11. Slow? Not so much... at least it loads all the tiles in Firefox on the Mac. Google's biggest issue is that some tiles just never load or take 5 minutes or more to finish. This doesn't happen here. Major improvement.

    As far as the preview not live-updating the main map, I think it would be entirely at cross-purposes to the purpose of the preview to begin with. Grab the preview, move it, and boom, you've "jumped" the main map to the new location. I like it.

    Having the zoom control gesture set to that up=zoom out is backwards to all the sliders in all the map tools out there, but it's a minor issue and only took a few minutes to get used to.

    One major thing missing is sattelite images... or maybe I just couldn't find the switch. Either way, this IS a beta and I'm sure more good stuff will come soon. It's been a long time since I saw anything from Yahoo that I liked or that was really even unique or interesting... this is a win for them from my perspective.

    Good job!

    Laterz!

    Jared Rypka-Hauer - 6th November 2005 21:39 - #

  12. Even though Flex 1.5 was targetted at "enterprise" development (as you note), Flex 2 comes in a basic flavour. It's currently in public alpha and can be downloaded from the labs.macromedia.com site.

    Manish Jethani - 7th November 2005 03:26 - #

  13. Hope they add the rest of the world soon.

    caitlin@sbate.com - 7th November 2005 13:17 - #

  14. Actually, the "real time" restriction of Yahoo Maps isn't there in Google Maps that I can see. The only similar restriction on Google Maps is regarding "real time route guidance", which is different than the "real time sensor location" of Yahoo Maps. Yahoo's restriction doesn't allow support for things like Plazes, Mologogo or anything that allows a user to specify their current location and have it displayed on a map (even if said map isn't available by the user that uploaded their location).

    Andrew Turner - 7th November 2005 13:46 - #

  15. Still very much a beta. Breaks code (MX 2004) every time that you place the component on the stage. Mathias

    Mathias - 8th November 2005 18:38 - #

  16. Also, don't forget that there's a Simple API which accepts a geocoded RSS feed to place points and info on the map.

    l.m.orchard - 11th November 2005 19:16 - #

  17. I just learned about the new Yahoo Maps late last night and have been playing with it today.

    I have an AJAX application using GMaps that does bike routing. I generate the route on the server and then use the GMap API to draw the route on the map.

    I started converting that app to YMaps because I want to use the geocoding and local services. Everything was going great (only taking a few minutes really) until I got to the line drawing part and noticed the YMaps doesn't have a PolyLine method. I just assumed it was there since the API looks so similar at a glance.

    I think this a really important feature and I wonder if it will be incorporated or if there is a way to do it that I'm not aware of. This is the only thing keeping me from making a complete switch.

    Wyatt - 27th November 2005 04:19 - #

  18. I am a Web developer. I also want to know about which Yahoo! API to use while getting Driving Direction and also if you know then let me know how to find calculation between two zip code (i.e. 9-digit zip code) in miles/kms that doesnt matter. I also want to implement live traffic reports so if you come to know about its API then reply me back. Thanx in advance.

    tejas - 24th March 2006 08:55 - #

  19. no

    neeraj - 7th June 2006 11:18 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2005/11/03/maps

A django site