New API enables Google Maps to be embedded in Flash apps

By Scott M. Fulton, III | Published May 15, 2008, 3:54 PM

In a move that could signal a break from Google's dependence on HTML-structured pages with JavaScript code, the company today unveiled its first working API for embedding functionality inside an Adobe Flash-based application.

Google's new Maps API for Flash now enables developers of Flash-endowed Web sites to embed Google Maps directly, but also more importantly to acquire and manipulate the data on which those maps are based. The result can be something more than the way, say, a YouTube video is "embedded" into a Web site by dropping in its <OBJECT> element.

According to new documentation released by Google this morning, using Adobe's Flex environment and the ActionScript language, a developer can import Google's map libraries into a page first by declaring their events. Since Web services operate on an asynchronous model, events serve as signals that Google's servers send to a client, to which a program can respond with functions. In order to cut right to the chase, events pretty much comprise the backbone of Google Maps API code; the very act of creating the map itself, including setting its initial location and search criteria, is phrased as a response to the event code MAP_READY. The Flex developer sets up a listener in ActionScript, which points by name to a function to be executed in response to that event.

From there, data points relevant to the map at hand can be retrieved as variables, and then used in other Flex functions. One compelling example of the Maps API in action was developed for today's unveiling by Flash components producer AFComponents, and posted on Google's corporate blog this morning.

The example shows a typical-looking Google Map that starts at San Francisco. A tour of the world has been programmed in, and AFComponents' example has plugged the route for that tour into the map, so Google displays it as a line. Meanwhile, a frame along the right side shows a Flash video of the highlights of all those points along the tour.

As the Flash video plays, complete with ragtime music, the Map repositions itself at each waypoint along the tour in sync with the destination shown in the video. And the running video slider along the bottom is decorated with waypoint markers that correspond to those same points on the map, so you can see at what time a certain waypoint is featured. It's a three-way interface of data elements, all in perfect sync, and all using an asynchronous programming platform.

Rather than release the Maps API as a beta, as Google developer Mike Jones blogged this morning, the company decided to try simply releasing what they had so far, knowing that Web sites would link to it anyway, and that any changes or fixes the company makes will be implemented along the way.

"We knew that version 1 of any software project is not perfect, so we opted to split the interface and implementation," Jones wrote. "As a result, you can build against the current version of the API, and as we add enhancements and tweaks, your Web site benefits automatically from each update. When you wish to take advantage of new API functions, only then do you need to download the latest API and rebuild."

Last month, Google introduced special APIs for its search, RSS feed, and language services for Flash sites, though a Web service API for Google Search through Flash had been unofficially available since about 2005.

The addition of server-based maps to Flash apps is actually nothing new; though Jones characterized it as a baby being let loose upon the world for the first time, a similar API for Yahoo Maps has been available since November 2005.

Comments

In all seriousness Scott, This was well-written. Good Job.
To those below- Why bring MS into it? And, really, using M$ is childish and says more about your mental stature than anything else.

Have a nice day:) and be sure to drink your milk:)

Score: 0

|

Let me look into my crystal ball....M$ will include their maps in Silverturd in the coming months...always following, never leading.

Score: 0

|

Part of MS's problem is the antitrust dealie really screwed them. Every new line of code attorneys have to look over to make sure they don't run into antitrust action again. Normally in the U.S. their antitrust actions might be overlooked, but the euros seem rather pissy about it...

Score: 0

|

Silverlight 3 goes live on Microsoft's servers

Microsoft's answer to Adobe's Flash is (unofficially) here, with prospects of higher-speed, higher-resolution video and for the first time, 3D.

Three Android phones on the way from T-Mobile in 2009

T-Mobile's myTouch 3G, launched Wednesday, will be followed by two more Android phones later this year, but neither of them will be HTC's Hero.

Best Buy-brand TVs to get TiVo

A new alliance will place the retailer's own brand alongide the manufacturers, and could also lead to future partnerships on services.

LTE still lacks a voice

The 4G Wireless standard that Verizon hopes to show off before this year is out is still at a loss for (spoken) words.

Data sharing among online advertisers: Is sanity in sight?

Lockdown with Angela Gunn In the middle of a 15-page plea not to get regulated, a spark of smart thinking.

T-Mobile's strategy to combat Apple's iPhone with Android

With a trio of Android phones now in the pipeline for 2009, T-Mobile hopes to break the iPhone's emerging stranglehold.

EC's Reding: Government should act as broker for media downloads

If Internet media services don't step up and build an attractive way for users to start paying for downloads, a commissioner says, government may do the job instead.

Sony TVs get Netflix, still no PS3

Though it's coming in behind LG, Samsung, and Microsoft, Sony will begin to offer Netflix streaming, too.

Google Chrome OS: Too little, too early

Carmi Levy: Wide Angle Zoom Don't start the revolution just yet, says Carmi, who isn't so certain Chrome OS will be the "Windows Killer."

GAO pen test brings the hammer down on federal rent-a-cops

But are the computers to blame for the contract-guard fiasco at FPS?

What's Next: Chrome OS will have at least some friends in high places

Also: South Korea takes another round of DDoS abuse, and Neelie Kroes and Steve Ballmer may shake hands before she exits stage left.

Report: Evidence of further creativity with Windows 7 upgrade prices

A ZDNet blogger did some serious digging for clues as to a reported price break on multiple Windows 7 Home Premium licenses, and may have found it.