Get JavaScript Access to Google's Flash Maps API

Adam DuVander
Dec. 17 2009, 03:17AM EST

When you want animated maps or zippier feedback than Google's JavaScript mapping API can provide, you can use the Flash Maps API. Yes, even Google acknowledges that its popular, full-featured platform can't do everything. Using the Flash API used to mean you needed to know Flash. Now, you can get the benefit, but still program in JavaScript.

Web developer Nianwei Liu has released a wrapper API for Flash Maps, called Map Bridge:

"The concept is very simple: programing a flash component with JavaScript, similar to what you do with GStreetViewPanorama. This library exposes all core classes in the Flash API and packages them in an easy to use way."

The code then becomes quite similar to the standard Google Maps API, as well as other mapping platforms. A map is attached to a DOM element via JavaScript. An included library takes over to insert the map in its place, only instead of loading tiles via JavaScript, it calls Flash functions.

JavaScript Flash Maps

An example within the announcement post shows driving directions with an animated fly-over. Like Liu's mention of Street View, this shows why Flash can be useful for mapping. Even the geniuses that originally created Google Maps can't get an experience as smooth as what Flash provides.

The highly technical and curious will appreciate that Map Bridge is open sourced. Like other mapping wrapper APIs, such as Mapstraction, you can alter and contribute to the codebase. Or, just find out how it works. Perhaps other API providers will learn from Map Bridge, making Flash APIs accessible to more developers by including JavaScript wrappers.

Adam DuVander Hi! I'm Developer Communications Director for SendGrid and former Executive Editor of ProgrammableWeb. I currently serve as a Contributing Editor. If you have API news, or are interested in writing for ProgrammableWeb, please contact editor@programmableweb.com Though I'm a fan of anything API-related, my particular interest is in mapping. I've published a how-to book, Map Scripting 101, to get anyone started making maps on websites. In a not-so-distant past life I wrote for Wired and Webmonkey.

Comments