New tutorial on Google maps with Flex

I just uploaded a new tutorial that guides you through the basics of creating a Google Maps application in Flex. In addition the tutorial also covers the use of PHP to retrieve data from a MySQL database. The end result is a map of Afghanistan which shows custom image markers at certain locations that were important in the war. This is a great skill to have as I was asked frequently to do map stuff back when I did real work.

Lee


Commentary

  1. Oliver says:

    “The end result is a map of Afghanistan which shows custom image markers at certain locations that were important in the war.”

    Bad topic…what do you think about WAR ? Do you know anything about Afghanistan ? Do you support the U.S Policy ? Is Obama the savior of the (U.S) Nation ?

    Anyway a good tutorial as always.

  2. TK says:

    “This is a great skill to have as I was asked frequently to do map stuff back when I did real work.

    I wish I didn’t do “real work…” :(

  3. lee says:

    @Oliver This map simply contains factual data about the war. I can’t stand politically correct nonsense like your comment. I only discuss my own thoughts on such matters with friends and not on my blog. Lighten up.

  4. lee says:

    @TK Well I mean real project work. Trust me I still have to work :)

  5. mpc says:

    Really great tutorial I love it, I’m glad that it considers flex :)

  6. vi54 says:

    Great new tut, i actually saw it popping up when i just checked the site. Nice moment, i’ll never forget it ;)

    greetings

  7. jj says:

    @oliver

    what an idiotic comment

    appreciate the effort lee…as always.

  8. Great as always, thanks again!

    Will we ever see these tutorials being moved over to the Adobe TV platform?

  9. Timo says:

    “… when I did real work” :)

    Nice tutorial btw ;)

  10. Marc says:

    Great tut lee! Love it! ^^ This will help me alot! :)

  11. Macaca says:

    Please also note there’s an excelent API for Google-Maps in Flash (non-flex). It’s allmost exactly the same, except it doesn’t have data binding etc. Good stuff, nice documentation and quick-starts a plenty.

  12. Oliver says:

    @jj,

    if you’re stone blind,that’s ok.But use your brain before you comment.

  13. antigirl says:

    I remember trying to integrate google maps when flex 2 was released, the support for AS3 was terrible, zooming and marker capabilities were bog standard, i had great ideas to create city tour applications but alas that time has now gone :/

  14. Christian says:

    “… when I did real work” … hahaha

  15. Curran says:

    Nice one Lee!

    3 quick questions:
    1) Is this API Flex only or could I do something in CS3 with it?
    2) Can you capture CLICK events on your custom (or default) markers?
    3) Does it have to fill the whole stage or could you integrate it in a smaller DisplayObject?

    Thanks so much

  16. Marc says:

    Part 2 please? The one that saves the coordinates to database when you click on the map :D

  17. Great tutorial. For those flashy ppl out there I made a small demo in CS3, I will try and get the code a bit cleaner later for download. Click the link above.

  18. Curran says:

    @michael nice work. Could you post a link to your source files? Thanks!

  19. Greg Lynch says:

    Lee Brimelow is on fire with the tutorials. Thank the heavens.

    Hey Lee,
    Is there a way to connect the dots on the map? Is there something in the API you can call to do this. I’d like to do a tour map and incorporate your plot points.

    Greg

  20. Troy says:

    @Curran
    Here is how you can make this work in Flash.

    1. If your using Flash and not Flex, take th .swc file for flash and copy it into your components library. It should be located at \C:Program FilesAdobeAdobe Flash CS4CommonConfiguration\. You should have access to the API now that you copied that file.

    2. Google Maps has its own built in Events. So look in the documentation for the \MapMouseEvent\.

    3. It does not have to take up the full browser. This will be simple for you I’m sure when you get it working in Flash.

  21. Curran says:

    @Troy -> Thanks for the info!

    I found some more great info at
    http://code.google.com/apis/maps/documentation/flash/tutorial-flash.html

  22. josue says:

    Lee, is that possible to do this with coldfusion, i just used coldfusion i just want to know if can be with cfm

  23. Rob says:

    Hey Everyone,

    This GGLMP feature is great! I made a nice tour with moving maps and popping information about exact locations..

    Was something like:
    ——————–
    var marker:Marker = new Marker(latlng, new MarkerOptions({draggable: true}));
    var options:InfoWindowOptions = new InfoWindowOptions({
    customContent: new InfoWindowMapComponent(latlng),
    customOffset: new Point(2, 3),
    width: 640,
    height: 440,
    drawDefaultFrame: true
    ————————

    Regards,

    Rob

  24. anthony says:

    Great Job Lee !
    I use your tutorial for design a solution with geocoding and I ask myself: how to add information from my database (“name” and “address” in my case) to all markers (dynamically with OpenWindowInfo)
    Thanks !

  25. anthony says:

    Now is OK ! I check my address with a geocoder and I store my latitude and Longitude (LatLng) into my database. After I can place my marker dynamically on my map with “name” and “address” (I use AMFPHP in my case).
    Thanks !

  26. AP says:

    how do u do the same application as desktop application …
    anyone ??

  27. ET says:

    Hi, Looks like a cool tutorial. i don’t suppose you have it as a pdf do you?

  28. Božo says:

    Great tutorial! Thank you.

  29. Larry says:

    Great tutorial. nice addition to this would be to show how to get variables for use with the map “application”.

    An example would be get the map api from the mysql database, map sizes and other stuff stored externally, pulled in by the app and used by the app.

  30. Marylka says:

    How can I connect database mysql with ColdFusion

  1. [... I just uploaded a new tutorial that guides you through the basics of creating a Google Maps application in Flex. In addition the tutorial also covers the use of PHP ...]

  2. [... I just uploaded a new tutorial that guides you through the basics of creating a Google Maps application in Flex. In addition the tutorial also covers the use of PHP ...]

  3. [... I just uploaded a new tutorial that guides you through the basics of creating a Google Maps application in Flex. In addition the tutorial also covers the use of PHP ...]

  4. [... I just uploaded a new tutorial that guides you through the basics of creating a Google Maps application in Flex. In addition the tutorial also covers the use of PHP ...]

Leave a Comment