Google versus Yahoo — Comparing the Map APIs
Tuesday, January 17th, 2006Over the holidays, I added map-based navigation to our photo albums. In the process, I tried out both Yahoo and Google’s AJAX map APIs. In fact, I implemented the album in both APIs (Yahoo / Google). That was a lot of fun and very educational for me. So, here are some observations I’d like to share.
First, I have to note that the AJAX APIs for the two services are extremely similiar. In fact, to port my album from Google to Yahoo, I only need to substitute Google API objects (e.g., GMap, GMarker, GEvent) with corresponding Yahoo API objects (e.g., YMap, YMarker, YEvent). The two implementations of my album have almost the same amount of code. So, whichever service you choose, your investment in the code is pretty much protected if you decide to switch to the other later. Okay, so now the differences:
Google has satellite images while Yahoo does not. Satellite maps not only are a major “coolness” factor but also have practical uses. For instance, in my photo album application, I would like to show points of interests along hiking trails or beyond paved roads. Google also allows you to draw lines or even polygans on the map. Very handy if you want to illustrate a route. I am surprised that Yahoo does not provide this rather basic functionality.
Yahoo’s AJAX API does not support line drawing but it handles more mouse events tha the Google API. For instance, I can use mouse over to display smart info windows in Yahoo. Overall, the Yahoo AJAX API is no more superior than Google’s. So, why should you consider Yahoo at all? The real reason to use Yahoo Maps API is to take advantage of its Flash API. The Yahoo Flash API produces much better looking markers. But even more importantly, it integrates other Yahoo web services into the API calls. For instance, with the Yahoo Flash API, you can do the following with a single API call:
- Instantiate markers using street addresses. Google does not offer geo-coding services and you have to somehow get the latitude/longtitude of the marker before you can plot on a Google map.
- Plot results from Yahoo Local Search. Google does not expose their local search data.
- Load in large number of markers from external XML files. In contrast, in Google, you’d have to make an AJAX call to the XML file and parse it yourself.
It puzzles me why Yahoo would NOT integrate those valuable services in their AJAX API. If they had done so, the Yahoo AJAX API would have a big edge over Google’s. But on the plus side, Yahoo also makes the geocoding / local search / traffic services available as REST style web services. That allows you to integrate them into AJAX applications, where the native map API does not provide those features. You can do that either from the browser (via AJAX calls) or from the server side (when you dynamically assemble the JavaScript for the page). You can even integrate those Yahoo services in Google AJAX Map applications. Kudos to Yahoo!
So, what’s verdict? I think for most pure mapping applications, Google is sufficient unless you want the additional Flash UI eye candy. But if you want to develop a serious location application, you will probably need the geocoding and/or local search services from Yahoo. At this moment, the most powerful breed of AJAX mapping applications can combine Yahoo’s geocoding / local search services together with Google’s satellite maps and polygon plotting.
