Google Maps in Flash

Hi, I've been researching embedding google maps in Flash and have followed the Google Maps API developers guide (after downlaoding and installing the SDK and generating a key).  I'm currently using the foloowing code,m but it doesnt seem to work I'm not even seeing the map, and Im getting errors relating to the controls elements I've added.  Can anyone help?
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.Controls;
var map:Map = new Map();
map.key = "ABQIAAAAdrPixq2HTFFowI9qjk74wxRIyoY1_2mmZno9JS0jJW-gT85BPRRotnr4suVY_4iicnk27GnnECcjXQ";
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_READY, onMapReady);
this.addChild(map);
function onMapReady(event:Event):void {
  map.addControl(new ZoomControl());
  map.addControl(new PositionControl());
  map.addControl(new MapTypeControl());
  map.setCenter(new LatLng(53.535192,-2.00475), 14, MapType.NORMAL_MAP_TYPE);
  var m:Marker = new Marker(new LatLng(53.535192,-2.00475));
  map.addOverlay(m);

Hi there. I downloaded the SDK myself and managed to solve your problem. It's because of your imports.
First of all make sure the .swc file is in your library ( found in the lib folder called "map_1_18" )
(Whilst in Flash) Press Ctrl+U to open up the preferences, then go to the Actionscript category and select "AS3 settings"
Press the red button to browse to your .swc file.
Also have the SDK in your directory.
Then change your imports to this;
import com.google.maps.LatLng;
import com.google.maps.overlays.Marker;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.controls.*;
You forgot to add one, and also you were importing the Controls folder and not the contents. ...And your map should debug perfectly. Happy Mapping!

Similar Messages

  • Google Map in Flash

    Hi friends,
    I am trying to put a google map into my flash website or
    aplication. If someone can help me, it will be helpful to me to
    finish my project, i got struct up.. pls...
    i want to insert some particular place maps in flash
    application. like while click on contact location, i want to show
    my flash application map. or embed in my web page.
    Thanks in advance,
    Rahimhaji

    Hello, did you have any success getting google maps in Flash.
    the google maps api exist now, I am having problems positioning the
    map on specific co-ordinates on my stage - any ideas?
    Richard

  • Google Maps for Flash in AIR for Android: ~2 minutes to start up

    I have a "Hello World" style AIR for Android app using Flash Builder 4 Burrito/Flex Hero.
    When debugging on device (stock HTC Desire) using Flex version v1.20 of Google Maps for Flash (map_flex_1_20.swc), it takes 1 minute and 50 seconds for the app to startup to display a simple map:Map3D on the home screen. The same app without the map:Map3D object starts in just a few seconds.
    There are no startup delays using the simulator.
    Anyone know what might be causing the severe startup delay when running on device?
    Thanks,
    Stephen

    Hi - yes no problem: I've uploaded a sample app here: http://crackedfrog.com/files/AndroidAIRMap.zip.
    You'll need to add a valid Google Maps API key and corresponding URL back into the maps:Map3D object:
    <maps:Map3D left="0" right="0" top="0" bottom="0"
      xmlns:maps="com.google.maps.*" id="map"
      url=""
      key=""
      sensor="false"/>
    This shows the same behaviour as described above - around 2 minutes to start up when debugging on the device.
    Appreciate any help.
    Thanks,
    Stephen

  • Can you insert a google map in flash?

    I was wondering
    how I could insert a google map in a
    flash app and preserve the interactive aspects of the google map?
    Thank you for the help.

    yes, for as3, there's an api for flash.  check the google docs.
    for as2, you can purchase (or they may be a free) google component or, use javascript and the flash externalinterface class.

  • Google maps for flash been Deprecated !

    Hello. i just wana notify the comunity about a serious step tooken from google to kill the maps for flash, because seems like they can not handle them.
    I would like to hear Adobe opinion - can Adobe do their developers a favor and asign a programmers to took close deal with google and continue the maps for flash ?
    This is not a simple issue, it will be a vital for the future development of many things connected to Adobe and Google.
    Please consider the question carefully.

    http://code.google.com/apis/maps/documentation/flash/
    "Note: The Google Maps API for Flash has been officially deprecated as of September 2, 2011. The API will continue to work as per ourdeprecation policy, but we encourage you to migrate your applications to version 3 of the Maps JavaScript API."
    The statement is perfectly LOL.
    And seems like google can not pay 2-3 more developers to took care for thoose API,
    The forum comunity related to this API vould like to ask if can Adobe took care on it because they have proven as a good team of developers already.

  • Google Maps en Flash

    ¿Sabéis si es posible implementar Google Maps
    dentro de un .fla?

    Flashearth es una aplicación web o de escritorio, pero
    si lo que quieres es
    hacerlo tú mismo en tu web puedes echar un vistazo a
    VGMap, que además de de
    open source:
    http://www.flashinsider.com/2005/10/23/add-flash-to-your-google-maps/
    Salu2
    `8¬}
    Juan Muro
    "Juan Muro `8¬}" <[email protected]>
    escribió en el mensaje
    news:elbkqd$11p$[email protected]..
    >
    http://www.flashearth.com/
    > Salu2
    > `8¬}
    > Juan Muro
    > "Naranja" <[email protected]> escribió
    en el mensaje
    > news:elbjhd$slp$[email protected]..
    >> ¿y sabes de algún sitio donde pueda
    recavar información de cómo hacerlo?
    >
    >

  • Google Maps embedded in Flash

    Hi,
    Just wondering if it's at all possible to embedd an interactive Map supplied by Google Maps, that uses the following code to display the map:
    <iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Swansea,+UK&sll=37.0625,-95.67 7068&sspn=49.357162,79.013672&ie=UTF8&split=0&t=k&ll=51.620361,-3.946495&spn=0.063948,0.10 2997&z=12&iwloc=A&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=Swansea,+UK&sll=37.0625,-95. 677068&sspn=49.357162,79.013672&ie=UTF8&split=0&t=k&ll=51.620361,-3.946495&spn=0.063948,0. 102997&z=12&iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>

    Ah ha, found a tutorial on Google itself, they've thought of everything!
    Anyone else pondering this questions simply google "google maps and flash"

  • To many security approvals need to use my Google maps! (Running KitKat)

    Now that my Verizon S3 phone has been updated to KitKat the number of security boilerplate approvals needed to use anything related to maps or GPS is unacceptable.
    I can't leave the GPS on as it drains that battery. So here is the problem:  I'm driving along and I need to see my maps, before I would just hit the map button and I would see the map in the approximate area, no GPS required.  Now when I do the same, I get a box for settings, I click on that and it sends me to a Location page where I need to turn on the GPS, now I need to Agree that I have turned on the GPS, now I get another box to Agree that Google apps are collecting my location info, at this point I need back step out to the map app to see where I'm at.
    Most users of the maps app will use it while driving (even if you don't think it's a good idea).  I don't think going from 1 step to 5 is making the situation any safer, it's now takes many more seconds of not looking at the road to getting the app working then it had before.
    If you have a fix for this, that would be great!

    Thanks for it, I was too looking for the hello world example
    of using externalInterface to load a Google Map into Flash using
    AS2, I had asked this question many here, but did not get proper
    answer, when I had googled I had got this page, I got the answer.
    Thanks again & hope I will get more info from this forum.

  • Google Maps with AS2

    Hi all,
    Is there an easy way of embeding a movable google maps in Flash CS6 using AS2. The Google Maps API for flash won't provide anyone with new API keys anymore. I wondering if there is a way to use an HTML iframe in flash as then I would be able to somply embed the map in my Flash document using the code that google gives you.
    Thanks in advance

    you should be able to use the javascript api with actionscript's externalinterface to use google maps and as2.

  • Flash 11.1.102.55 crashes IE8 on Google Maps / street view

    Since the Flash update to 11.1.102.55 I have had repeated crashes of my 32 bit Windows XP SP3 system.  They typically have happened in Internet Explorer 8, 32 bit version (updated with latest MS patches).
    Sometimes the IE8 lock ups can be cleared by using task manager.  About 30% of the time, a machine power down/ reset is the only solution -- the screen freezes (mouse won't move, clock stops, Ctrl-Alt-Del won't work).
    The machine is a Lenovo Z61p with 3Gb available memory.
    I have been able to repeat the crashes by going to Google maps.
    Example:
    1. Go to Google Maps
    2. Look at Arlington National Cemetery in regular view
    3. Move the "Street View" stick figure to one of the Panarama photo points.  Screen with show photo view
    4. In the shrunken lower right corner map view, expand the map view to cover half the screen.
    Things may get dicy about now.
    5. Try moving the stick figure on the map.  OR try expanding the photo to full screen.
    I get repeated lockup at this point.

    Try using a different browser. I use Firefox which you can download from here: http://www.mozilla.org/en-US/firefox/fx/
    If you don't like the "Tabs On Top" layout, you can move them to below the location bar by simply right clicking a blank part of it and then click the menu items called "Tabs on top" to remove the checkmark. Tabs will subsequently appear below. Other tab layout options can be found in this support article: http://support.mozilla.com/en-US/kb/how-do-i-customize-toolbars
    There are no issues with Google Maps as far as I'm aware.

  • YouTube, Facebook, Google Maps doesn't work - says Flash Player is out of date

    Hello.
    I have MacBook Pro since summer last year. In recent days, strange problem occured. When I want to open either YouTube, Facebook or Google Maps a window pops up saying "WARNING! Your Flash Player may be out of date. Please update to continue." (fig. 1) After clicking on OK, Safari shows page, that looks like Adobe Update page (fig. 2). After clicking anywhere, a setup.exe file is downloaded and thats all. After this, nothing else happens. I still cant view these pages and it is pretty annoying. I tried installing, uninstalling and reinstalling Flash Player but it didn't helped. I also searched the web but couldn't find solution. Any help will be highly appreciated.
    Fig 1.
    Fig 2

    The update alerts are fake, and are intended to dupe you into installing malware or disclosing private information so that your identity can be stolen.
    You might get the alerts when visiting a website that has been hacked. Don't visit the site again. If applicable, notify the site administrator of the problem, but don't send email to an unknown party.
    If you get the alerts when visiting more than one well-known website, such as Google, YouTube, or Facebook, then they're almost certainly the result of an attack on your router that has caused you to get false results from looking up the addresses of Internet servers. Requests sent to those sites are redirected to a server controlled by the attacker. It's possible, but less likely, that the DNS server used by your ISP has been attacked, but you should assume that the router is at fault until proven otherwise.
    The router's documentation should tell you how to reset it to the factory default state. Usually there's a pinhole switch somewhere in the back. It may be labeled "RESET." Insert the end of a straightened paper clip or a similar tool and press the button inside for perhaps 15 seconds, or as long as the instructions specify.
    After resetting the router, quit the web browser and relaunch it while holding down the shift key. From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Do the equivalent if you use another browser. Open the Downloads folder and delete anything you don't recognize.
    Then go through the router's initial setup procedure. I can't be specific, because it's different for every model. The key points are these:
    1. Don't allow the router to be administered from the WAN (Internet) port, if it has that option. Most do.
    2. Set a strong password to protect the router's settings: at least ten random upper- and lower-case letters and digits.  Don't use the default password or any other that could be guessed. Any password that you can remember is weak.
    3. If the router is wireless, or if you have a wireless access point on the network, use "WPA 2 Personal" security and set a different strong password to protect the network. If the router or access point doesn't support WPA 2, it's obsolete and must be replaced.
    During the time the router was compromised, you were redirected to bogus websites. If you ever connected to a secure site and got a warning from your browser that the identity of the server could not be verified, and you dismissed that warning in order to log in, assume that your credentials for the site have been stolen and that the attacker has control of the account. This warning also applies to all websites on which you saw the fake update alerts.
    Check the router manufacturer's website for a firmware update.
    If you downloaded and installed what you thought was a software update, ask for instructions.

  • Should I download and install the latest version of Adobe Flash to use with Lion?  My need for Flash is very basic: Google Maps, YouTube, and content on certain websites.  Thanks for any help you are able to provide.

    Should I download and install the latest version of Adobe Flash to use with Lion?  My need for Flash is very basic: Google Maps, YouTube, and content on certain websites.  Thanks for any help you are able to provide.

    Thanks for the speedy reply.  I have read so many comments about Flash being incompatible with Lion I was wondering whether to download it or not.  So many sites on the Web still require flash, however, you almost don't have a choice but to download it even if it is incompatible.  I gather a better version of Flash will be available for Lion soon.  Again, thanks for the help.  I will download the latest version of Flash.

  • Google Maps API for flash not working on real device iPad

    I use flash builder 4.5.1 to build app for Google Maps API for iOS (map_flex_1_20.swc), and it is working well even on the simulator on PC, but after I generate the IPA use FB4.5.1, and install on iPad , it not working at all, only show a while screen.(I used the TabbedViewNavigatorApplication, the botton Tabbar is working, I can switch the page, but on the maps page show nothing)
    I also try the code on Flash CS5.5  using map_1_20.swc , when on the PC debug, it works well,(swf files), but install the AIR ipa on the iPAD, show nothing only a white sceeen.
    anyone  met this problem?

    You can also use the MapQuest Mobile Flash Maps API.  It's supported by MapQuest and does not need any work-arounds in order to work with the Flash Platform.  It also takes advantage of the "build once, deploy anywhere" functionality in Flex 4.5+.  MapQuest provides a demo app for Android and iOS and has the source code available for download, too.

  • Google earth like map in flash

    Hello,
    I am studying land surveying and cartography and I am doing my final project. I am trying to make a google  earth like map in Flash.I allready have the map , in the form of swf  files. the idea is that  when the user will scroll, an swf is going to be substituted with another one   Can anyone give me any hints on how to do it?

    If you want to have one swf replqace another then you probably want to use some form of loader.  Which form you use is up to you, but the most basic is simply the Loader class.  A loader is only able to load/hold one loaded object at a time, but you can reload it with other content and replace what is there as you wish.
    You should Google "AS3 Loader tutorial" to get an idea of how to load external files (such as swf's).

  • Problem #2 Upon startup get flashing Google map icon then ? finally starts

    In further review and work towards external hard drive (startup disc) near full,
    I have encounterd upon startup a flashing icon which I believe is google world or map icon. This flashes for about 30 seconds, and then turns into a flashing ?? with a Mac type face/file. The google map or world app does not appear to be anywhere that I can find on the computer. Any advice on how to make right?
    Also how can users download stuff like this without admin privileges.
    Thanks Jim Svarz

    Hi Again Jim Svarz!
    In System Preferences > Startup Disks, what should be selected is Mac OS X 10.3.7 on Macintosh HD.
    If that corrects the issue, what you were seeing wasn't a symptom of something that was downloaded. The system was just searching for a drive to start up from.
    ali b

Maybe you are looking for

  • HT5517 My daughters phone works on airplay but I can't get mine to work

    Just bought Apple TV, and can't get my iPhone 5 c to mirror.  My daughter has tried and it works on her phone but but not on mine or my iPad.  Please help.  My wife has tried her iPhone and she can't mirror either

  • What is "exited?" and why does it keep asking for access to Facebook?

    Has anyone else had this appear? I'm running the iOS 7 beta and every time I use the Facebook app or Safari I get about 4 alerts on screen with the phrase: "exited?" is requesting access to your contacts and basic information on Facebook I have no id

  • DME- Allignment issue for UK

    Hello Expert, I need assistance with respect to DME file creation for UK client. My issue is with alignment, I have created the file as per the layout provided by the client but the problem is below. Client want the file in the below format, VOL1 HDR

  • Slow brushes in windows 7 64bit

    Hi. I have photoshop CS5 installed in two machines as we are allowed. One in windows 7 32bit and the other on a 64bit.  On the 32bit machine the brushes work flawlessly but on the 64bit they lag. Now, my photoshop CS3 on the same 64bit machine works

  • Programming Report changed after time change

    Hello everybody, Beacause of this weekend time change, all the reports that i had and that were scheduled have been changed: Before time change:   The report was executed every for hours.....00:00; 04:00; 8:00; 12:00; 16:00 and so on..... After time