« Flex rich interface design: why big companies choose Flex | Main | How to receive data in response to a file upload in Flex »

Google Maps API for Flex and Flash: some tips and notes

Finally the official version of Google Maps for Flash is arrived.
Google has just released the Actionscript API that provides map functionalities to web applications in a way really similar to the Javascript version.
You can follow the instructions in the Setup or Tutorial pages on Google Code to easily build your web map application.
Here is a sample application based on data from Yubuk (click on the image):
GoogleMapsFlex

And now some hints that can be useful when creating your first Flex application with Google Maps:

1) Remember to add the .swc library provided by Google in their SDK in your compiler options. If you are using Flex Builder you can do that simply going in the project properties, under Flex Build Path, then Library Path and click Add SWC. Otherwise, if you like to use the command line, you can use the -library-path command as explained in the Google tutorial.

2) Pay attention to the events: you can't use the standard Flex events but you need that ones provided by the Google SDK, such as MapMouseEvent.CLICK.

3) Custom markers have a bug in the version 1.3. To avoid this bug there's a workaround in Google Code. The example has a small error in the marker event listener, the event should be MapMouseEvent.CLICK (as explained above).

I think that Google made a great work porting their Google Maps API to Flash. It is still incomplete but it's already possible to see the huge potential provided by the cooperation between Google Maps and Flex. I'm sure that in the near future there will be many interesting RIA based on these technologies.

TrackBack

TrackBack URL for this entry:
http://blog.comtaste.com/mt-tb.cgi/55

Comments (2)

test:

Hi,
I created a custom component for GMap in Flex 3.0 then I tried to use this component in Xcelsius as an Add-ons, but it throws errors.

Please give me suggestion over it.

game:

I think that this snapshot is google earth. I have downloaded google earth and one problme with this application is that it will not display the image clearly horizontally and vertically.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on May 26, 2008 12:13 PM.

The previous post in this blog was Flex rich interface design: why big companies choose Flex.

The next post in this blog is How to receive data in response to a file upload in Flex.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33