Welcome, guest Sign In

Yahoo! Maps AS3 Component

The all-new Yahoo! Maps component for Flash and Flex 3 enables you to add a map to a wide range of web and desktop applications. Included in the API is support for other Yahoo! APIs including geocoding, local search and traffic APIs along with an advanced marker and overlay system to allow you to easily render geo-data on the map.

Using the Yahoo! Maps component in your Flash, Flex, AIR or Ajax projects gives you the ability to develop anything from a simple map mash-up to full application utilizing the Yahoo! Maps engine.

How Do I Get Started?

Get started by signing up for an API key. Then download the component and check out the examples and class reference documentation to get familiar with the API.

Download The Component

The component is distributed as a SWC. To get it into your Flex 3 project, just drop it in your "libs" folder or point to it within your project build path. Using Flash CS3, install the provided MXP using the Adobe Extension Manager.

Version 0.9.4 - Download

Screen capture of YahooMap ActionScript Example

To see a live example, please install Adobe Flash Player version 9 or higher.

Initializing a YahooMap object with ActionScript

To instantiate a YahooMap object, import the YahooMap class first, then simply create an instance of it by passing your application ID, width and height, then add it to the display list using addChild().

This example uses the demonstration application ID "YD-.cSDwQg_JXjvfyONr52HwA--"; you cannot use this Application ID and must request one here.

At this point you can add event listeners, map controls and widgets to start interacting with the map.

Get Code, Get Inspired

Skip the documentation. We have a ton of sample applications to help you get started in short order, while learning more about the built-in functionality of the API and how to extend it further.

All of the code samples listed in the Examples section are provided free of charge under a BSD license.

Terms of Use

The Yahoo! Maps API is a free service for any application that is free of charge and does not exceed the rate limit of 50,000 requests a day. Please see the information on rate limiting, API licensing and the maps API usage policy for more information about building your application with Yahoo! or requesting an exception to the rate limits.

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions