|
As a part of their various portal services, Yahoo! offer a free mapping service that can easily interface with their other portal services (eg. address book). The map portal also has a number of programming interfaces that include Javascript AJAX, Flash, and a couple of web services.
To use the various APIs, you must register for a free developer's account. Free accounts are limited to 50,000 tile requests a day, and 5,000 geocoding requests a day. Map data is typically in the form of road maps, satellite maps, or hybrid maps. Satellite map resolution tends to be less than the offerings from Microsoft or Google. Map data and resolution are not consistent amongst Yahoo's different APIs. For example, the Flash API currently provides satellite imagery that is of a higher resolution than that from the AJAX API. Image response and refresh also tends not to be as smooth as with Google Maps or Microsoft Virtual Earth. The Javascript AJAX interface has similar abilities to offerings from competing companies. Here is some example code that draws a zoomed-in street map of San Francisco, and allows the user to add pushpins: ERROR [include_code_listing plugin]: File Not Found (/usr/www/users/winwaed/geowebguru/img/2009/yahoo_sample.html)
This code is based on an example in the Yahoo! documentation. After a few mouse clicks, it produces a map that looks like this:

As can be seen, calling an using the Yahoo Maps JavaScript control is similar to competing products. An unusual but potentially useful feature is the YLog object. This controls a logging display that can be used for debugging. Another useful feature is the ability to set the zoom level according to a viewable radius, instead of an altitude or an arbitrary number. The AJAX interface also supports polylines, traffic information, GeoRSS, and custom object overlays. Although the consumer version of Yahoo! Maps supports routing, this is not exposed in the API. Traffic information is not limited to a map overlay, and can be queried. Yahoo! Maps also has a Flash / Flex 3 interface called the Yahoo! Maps AS3 Component. This has similar abilities to the AJAX JavaScript API. See http://developer.yahoo.com/flash/maps/ for further details. The Yahoo! Map web services include services for geocoding and map images. The Map Image API is a RESTful query system that delivers PNG image tiles in response to URI requests. Location and image information are passed as URI query parameters. Here is an example URI:
http://local.yahooapis.com/MapsService/V1/mapImage?appid=YD-4g6HBf0_JX0yq2IsdnV1Ne9JTpKxQ3Miew--&street=701+First+Avenue&city=Sunnyvale&state=CA
The Map Image API responds with a short XML file that lists a URL for the PNG tile. Although geocoding is available in the AJAX and Flash interfaces, Yahoo also expose geocoding as a RESTful web service. The street address is passed as URI parameters, eg: http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&street=701+First+Ave&city=Sunnyvale&state=CA
The response is an XML file with matching result(s). Each result lists the matching address and the longitude, latitude coordinate. Overall, the Yahoo! Maps API includes a number of interesting features. These include a queryable traffic service, and RESTful web services. Negative aspects include the relatively low resolution satellite data, and the lack of routing support in the API.
|