10.4. Yahoo! Maps API

The Yahoo! Maps API debuted around the same time as the Google Maps API, but with less fanfare. The folks at Yahoo! decided to take an interesting approach to their new mapping product, developing both Ajax and Flash APIs. The Ajax API (covered here) is composed of JavaScript objects used to implement maps on any web site. The Flash API, on the other hand, can be embedded within Flash movies or Flex applications as well as embedded in web sites. Both the Ajax and Flash APIs use the same data and image sources, so visually there is very little difference between the two.

10.4.1. Getting Started

To use the Yahoo! Maps API, you must have a Yahoo! ID. If you don't have one, go to http://edit.yahoo.com and click on the "Sign Up" link. After signing up, go to http://api.search.yahoo.com/webservices/register_application to request an application ID. This application ID can be used not only for the Yahoo! Maps API but also for the other public Yahoo! APIs.

There are some limitations on using the Yahoo! Maps API:

  • The API is for noncommercial use only. You can contact Yahoo! directly to inquire about a commercial license.

  • The attribution inside of the map must not be obscured.

  • You are limited to 50,000 requests per day. If you anticipate needing more than that, you'll need to discuss your needs with Yahoo! directly.

Once you have agreed to the terms of use and received an application ID, you'll need to include the Yahoo! Maps API JavaScript file in your page. This file ...

Get Professional Ajax, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.