How embed Google Maps in Flex?


Google create a special API for Flash platform to make possible use them. I will show how write a simple application to find a place or route. At first we need a special key from Google for use the map (http://code.google.com/intl/pl/apis/maps/signup.html ). When we have the key we can start.

  1. add xmlns:maps=”com.google.maps.*” to Application tag
  2. import appropriate classes
  3. add map instance
  4. <maps:Map id="myMap" width="100%" height="100%"  key="[key from the google site]" mapevent_mapready="onMapReady(event)" url="[url to our site]"/>
  5. add functions
private function onMapReady(event:MapEvent):void {
	myMap.addControl(new MapTypeControl());							//add type of map control
	myMap.addControl(new ZoomControl());							//add zoom control
	myMap.enableScrollWheelZoom();								//enable mouse scrolling
	geocoder=new ClientGeocoder();								//create geocoder
	geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS, handleGeocodingSuccess);	//add listeners for geocoder
	geocoder.addEventListener(GeocodingEvent.GEOCODING_FAILURE, handleGeocodingFailure);
	dirs=new Directions();									//create directions
	dirs.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, handleDirLoad);		//add listeners for directions
	dirs.addEventListener(DirectionsEvent.DIRECTIONS_FAILURE, handleDirFail);

}

private function handleDirLoad(evt:DirectionsEvent):void{
	var dirs:Directions=evt.directions; 							//create directions from event
	var startM:Marker;
	var endM:Marker;
	startM = new Marker(dirs.getRoute(0).startGeocode.point, new MarkerOptions());		//create start marker from directions instance
	endM = new Marker(dirs.getRoute(0).endGeocode.point, new MarkerOptions());		//create end marker from directions instance
	myMap.clearOverlays();									//clear map
	myMap.addOverlay(dirs.createPolyline());						//draw route on map
	myMap.addOverlay(startM);								//add start marker
	myMap.addOverlay(endM);									//add end marker
	myMap.setZoom(myMap.getBoundsZoomLevel(dirs.bounds));					//set appropriate zoom
	myMap.setCenter(dirs.bounds.getCenter());						//show route
}

private function handleDirFail(evt:DirectionsEvent):void{					//directions failure handler
	Alert.show("Unable to found route");
}

private function handleGeocodingSuccess(evt:GeocodingEvent):void{				//geocoding success handler
	var result:Placemark = GeocodingResponse(evt.response).placemarks[0];			//create result object
	myMap.setCenter(result.point, 14);							//show finding place
}

private function handleGeocodingFailure(evt:GeocodingEvent):void{				//geocoding failure handler
	Alert.show("Unable to found: " + evt.name);
}

This is one out of many things we can do with GoogleMaps API, including e.g. adding information and photos in concrete places on the map.

  1. #1 by alquiler apartamento via parque benidorm at March 29th, 2019

    hi!,I love your writing so much! percentage we keep in touch more about your article on AOL?

    I need a specialist in this house to resolve my problem.
    Maybe that’s you! Having a look forward to look you.

  2. #2 by ignition casino poker at April 1st, 2019

    Wow, incredible blog structure! How long habe you been blogging for?
    you made running a blog look easy. Thhe overall glance of your site is great, let
    alone the content!

  3. #3 by betchainpromocode.com at April 3rd, 2019

    Aw, this was a really good post. Taking the time and actual effort to produce a superb
    article… bbut what can I say… I put things off a
    lot aand never manage to get anything done.

  4. #4 by Bettie at April 10th, 2019

    Please test yor e-mail for an unique supply.

  5. #5 by Dorie at April 10th, 2019

    Please check your e-mail for an exclusive supply.

  6. #6 by pixelscout6.webgarden.cz at April 11th, 2019

    This paragraph is genuinely a good one it assists new
    web viewers, who are wishing in favor of blogging.

  7. #7 by visit here at April 12th, 2019

    Enhancement processs is in reality a natural process and you have to make you flow accordingly.
    Thus unconfrolled frequency oof urine in males showss urgent should urinate.
    There are tactics you could implement today that will help you in suppressing on ejaculating.
    visit here

  8. #8 by Tankini Swimwear at April 14th, 2019

    Tankini Swimwear
    In 1918. Strunk was a Cornell University professor.

    White, a former student of Strunk, discovered the book in 1957.
    It a lane swim, people are there to swim not check on another out.
    Besides, if there anything visible (and chances are
    you overreacting and things aren as as they are in your head)
    it only on the short walk from the change room
    to the pool.Do yourself a favour and just go anyways.

    Walk tall, get a good work out, enjoy yourself.
    All he did after was look at me and say “shit dude, you gotten alot stronger”.

    He 17 and had been a victim of parental abduction by his non custodial mother.
    I had a conversation with him about how I didn feel good about myself because I
    couldn provide enough for him.

    swimwear sale Megyn is well known for her role as Claudia Finnerty
    on the TV series “Grounded For Life” and as Gale Ingersoll in “LateLine”.

    She had small roles in the 1999 films “Love Happens” and “Mystery Alaska” and has guest starred
    on the television shows “Quantum Leap” and “The Drew Carey Show.” Megyn graduated in communication and economics
    from Stanford University and also took classes at the American Conservatory Theater in San Francisco.
    She lives in Los Angeles with her husband Steady
    Eddie, who is an emergency room doctor, and their two dogs Trixie and Elmo.
    swimwear sale

    beach dresses She is my greatest love. Every moment I have
    the strength to keep my eyes open and stand on my feet,
    I devoted to my family. And to be told I not a good enough wife/mother by my husband but to also be resented
    because I not showing him affection AFTER
    he treated me like this. No idea, what DID happen last time someone was
    proclaimed the savior of Destiny? Cause Luke Smith sure as
    hell wasn ever considered the “Savior” of Destiny.

    The TTK was a great step in the right direction, and we all can and do agree on that, but the real savior was
    Chris Barrett with the constant live team updates, SRL,
    Custom Games, Kiosks, the changes to Infusion. The list really just goes on and on.
    beach dresses

    Sexy Bikini Swimsuit If you’re just doing a quick turn around I don’t think
    there’s really a huge different between glass, stainless or plastic
    only what’s easier to handle. These home
    conicals seem really nice and easy to clean with
    a big opening. I still prefer my Big Mouth Bubbler (glass) because it’s clear.
    Su toalla de playa de nuestra colecci s moderna
    para ir a la piscina o a la playa y atraer mucha atenci Gracias a sus impresiones gr y al dise original, no
    solo se ver geniales, sino que tambi traer buen rollo o elegancia si es necesario.
    Ser geniales para ambos: tomar el sol y tumbarse en la arena, as como para secarse
    despu de nadar en la piscina o el mar. Ver que absorben muy
    bien el agua y son muy suaves y c sofisticadas para mujeres
    con estilo. Sexy Bikini Swimsuit

    swimwear sale When a lot of material collects within an accretion disk (like hairs do
    near a drain), all that material smashes and grinds together.
    These collisions are incredibly energetic and create a lot
    of friction induced heat. Since the universe can truly create or
    destroy mass/energy, when the material loses some of its
    energy to friction, it falls closer and closer to the black hole.

    The way I look at it is next season Knicks
    fans can lose. If the Knicks play well without KP and damage the tank then it means our young guys
    are outperforming expectations. That require big leaps from
    some combination of THJ/Frank/Burke/Mudiay/ draft pick and means that Fiz is coaching well.

    swimwear sale

    beach dresses His nose is wet in comparison to other
    animal noses or compared to his body. It fine to say something is wet compared to
    what is considered the normal thing. Fish aren wet because fish live in water.
    Heroin is also weirdly easy to make and make pretty goddamn pure.
    That’s basically the dope scene in New Zealand. They call it homebake
    over there cuz they make the dope off of morphine pills and a little double.
    We view Limited’s margin expansion goals as ambitious, but also more attainable.
    Management remains dedicated to improving the operating income rate to 15%,
    and last quarter’s operating margin was a step in the right
    direction, as the margin expanded 200 basis points year over year to
    12.5%. The team also makes inventory control a priority, as it is committed
    to growing expenses slower than sales, which it has done impressively over
    the last two years. beach dresses

    dresses sale This broadband option is not popular among home users because requires an extra telephone line to facilitate faster uploads.
    Since most users access content that requires more download bandwidth, an ADSL usually suits their purpose well.
    SDSL is really a specialist option that some businesses use
    to service applications that send large amounts of data..
    1. Jacob Davis, a tailor in Reno, Nevada, came up with the idea of riveted pants
    in response to a customer whose pockets kept ripping.
    He feared someone might steal his idea and recruited Levi Strauss, owner of
    dry goods wholesaler Levi Strauss Co., as a business partner.
    dresses sale

    Monokinis swimwear Seriously, not to be a dick, but what
    the fuck? Have you millennials lost your minds?
    No previous generation would have stood for this. Again, not to
    be a dick, but if that dude was the “beta” what does that make you for letting her bring him
    along? God damn. I 31 and I never thought I be going “What the FUCK?!”
    this early on in my life. Fair warning though very few of us subscribe to the idea that dressing well is this faux gentlemanly
    notion of looking “classy” or “dapper”. MFA is not some anachronistic “scholar and a gentleman, good sir” cigar lounge where we chat about how we need to be the generation to bring hats back.

    Just typing that made me cringe.And as an aside to the
    MFA regulars reading this thread, it currently 1 on r/all much higher than yesterday top of WAYWT thread Monokinis swimwear.

  9. #9 by 20to20 at April 15th, 2019

    very hapy

  10. #10 by Robt at April 17th, 2019

    I know this web site presents quality dependent content and extra stuff,
    is there any other web page which gives these information in quality?

  11. #11 by Kyvio Exclusive Coupons at April 21st, 2019

    Thanks , I’ve just been searching for information about this subject
    for a long time and yours is the greatest I have found out till now.

    But, what about the conclusion? Are you positive concerning the supply?

  12. #12 by www.centranz.com at April 22nd, 2019

    For most up-to-date information you have to pay a quick visit internet and on world-wide-web I found this site as a
    most excellent web page for hottest updates.

  13. #13 by ซ่อมรถเบนซ์อุดร at April 23rd, 2019

    Your style is really unique in comparison to other people I have read stuff from.

    Many thanks for posting when you’ve got the
    opportunity, Guess I’ll just bookmark this web site.

  14. #14 by Buy Here at April 27th, 2019

    Wow that was unusual. I just wrote an really long comment but after I clicked submit
    my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful blog!

  15. #15 by dedicated streaming server at April 28th, 2019

    Hello!
    My Live streaming title is livestreamingplatform and I do
    live video streaming but I am a 24 a long time old boy from .

  16. #16 by cheap esa letter at April 28th, 2019

    Thanks for any other informative site. Where else may I get that kind of
    info written in such a perfect method? I’ve a undertaking that I am
    just now running on, and I have been at the glance out for such
    info.

  17. #17 by Situs Agen Bandar Sbobet Online Terbesar Di Indonesia at April 29th, 2019

    I know this website presents quality depending content and other data, is there any other web
    page which offers these kinds of information in quality?

  18. #18 by Dora at April 29th, 2019

    I like what you guys are usually up too.This kind of clever work and reporting!
    Keep up thee terrific works guys I’ve included yyou guys to our blogroll.

  19. #19 by Prediksi Togel Online Terakurat at April 29th, 2019

    I know this web site presents quality based posts and other material, is there any other
    website which presents these data in quality?

  20. #20 by delhi girls at April 30th, 2019

    It’s an amazing piece of writing for all the online visitors; they will get benefit from it I am sure.

  21. #21 by 명품레플리카사이트 at April 30th, 2019

    I savour, result in I discovered just what I was taking a look for.
    You’ve ended my four day lengthy hunt! God Bless
    you man. Have a great day. Bye

  22. #22 by fifa 19 coins for ps4 at May 1st, 2019

    Aw, this was an exceptionally nice post. Spending some time and actual effort to make a really good article… but what can I say… I put things off a
    whole lot and don’t manage to get anything done.

  23. #23 by minds.com at May 2nd, 2019

    You can certainly see your expertise in the article
    you write. The arena hopes for even more passionate writers like you who are
    not afraid to say how they believe. At all times go after your heart.

  24. #24 by bikini swimsuit at May 5th, 2019

    bikini swimsuit
    We have constraints, and work through these continually.
    I open to critique of support service and our infrastructure,
    but have no tolerance for the personal attacks which happen all too regularly.
    We talk of the integrity of the game in my opinion that should extend to how employees are treated, and how employees treat players.Whatever you may think of Infinity,
    I sad to see him go, and I worked closely with him for many years.
    And that just for DCI. During the heyday of DCA in the 80s and 90s very
    few high school kids marched. When I joined a DCA corps in 1998, I think I was one of 3
    5 high school kids in the hornline.

    Bathing Suits Often people will share a nightmare or bad
    dream with a friend or relative. If you are on the listening side,
    there are some simple skills you can use to listen to the dreamer.

    Jeremy Taylor and Gayle Delaney have been teaching these skills for years.

    Since the live action footage was to be animated over
    later, makeup, lighting and visible equipment, like boom mics, were less of a concern.[6] However, cinematographer Shane Kelly carefully composed shots and used a color palette with the animators
    in mind. Sometimes, they would show up to tell Kelly what they needed.

    Because the movie was being shot digitally and then animated, occasionally actors forgot they would later be animated as they worked through a
    scene. Bathing Suits

    Cheap Swimsuits Well, somewhere within me the thought bubbled
    up that, “Holy shit, this isn real, I dying on my friend floor of a heart attack and my brain is simulating this as a coping mechanism.” Friend convinces me to go outside but I literally couldn shake the feeling that
    I was dead and he was a part of the simulation whose
    sole intention was to convince me that reality was in fact real.
    That was about 6 months ago and still to this
    day I get the feeling that reality isn as “real” as we like to think it is.

    Drugs are a helluva drug.. Cheap Swimsuits

    one piece swimsuits If you made it this far, thanks for reading.
    As I said earlier I don talk much about him. I just
    live. Third, don be afraid to look at things that are in a
    size bigger or smaller. I am typically a L/12 in most things,
    but I go through the M and XL racks. One, the people who are sizing things are going by the label on the tag most the time, but some brands run larger or smaller.

    Shepard was slated to command the first Gemini flight, but was grounded in early 1964 after being diagnosed with Mnire’s disease,
    a condition in which fluid pressure builds up in the inner ear,
    resulting in disorientation, dizziness, and nausea. He stayed with the program, accepting
    the position of Chief Astronaut as Slayton’s deputy, until an experimental corrective surgery cured his
    Mnire’s disease and he was returned to flight status
    in May 1969. He commanded the Apollo 14 lunar landing mission in January February 1971 before leaving the program on July 31, 1974.[29].
    one piece swimsuits

    dresses sale Here are some fashion tips on how to look
    best with the type of dress mentioned. Small people would
    look better in light colors and is the other way round in case of
    huge people. As for instance, one hips are large, he or she would look good with a dark skirt or pants and a
    light colored blouse. I would now like to turn the conference
    over to Kevin Brogan [ph]. Thank you. Good afternoon and thank
    you for joining us today to review Appian’s fourth quarter and full year
    2017 financial results. If you requested printed versions of the proxy materials by mail, the materials also
    include the proxy card orvote instruction form.If your shares
    are held in a stock brokerage account or by a bank or other nominee, you
    are considered the beneficialowner ofshares held in “street name,” and these proxy materials are being
    forwarded to you by your broker or nominee who is considered, with respect to those shares, theshareholder of
    record. As the beneficial owner, you have the right to direct
    your broker, bank or other nominee on how to
    vote and are also invited to attend the annual meeting. With respect to thebeneficial
    owners of shares held by nominees, the methods by which you can access proxy materials and give voting instructions to your nominee may vary, depending on the nominee.
    dresses sale

    Bathing Suits 106 points submitted 9 days agoI teach science,
    and I don know all the details, but the history teacher across the hall has a day where she simulates
    factory conditions from the industrial revolution. She cranks up random factory sounds
    (clanking, whirring, etc.) really loud, has the lights down low, and makes
    the kids do something really tedious like stringing beads or threading nuts onto screws.

    The kids all really like it (for being memorable, not because yay child labor, haha).Biddybink 1 point
    submitted 1 month agoThe reason we don see an eclipse everywhere at the same time is because
    the moon is small enough, and far enough, that the umbra of its shadow is very small on us, and that where you see the eclipse in totality.
    Bathing Suits

    dresses sale Instead of removing the cooldown system
    from the game altogether, you could give players the opportunity to remove or decrease cooldown through
    the use of toilets. As far as I know, toilets do
    nothing apart from play a flushing sound and animation when interacted with in the base game, so if toilets reduced or removed cooldown when interacted with, I think it would add
    some immersion and improve gameplay a bit. Players wanting to eat a ton of
    food would have to frequently seek out toilets in order to eat more dresses sale.

  25. #25 by www.bandar66.poker at May 6th, 2019

    When you play digital poker it will save you the trouble
    of getting to generate to a casino or to a friends home.

    A great evening out should price a lot much more
    than many evenings of dropping at the poker tables. Also, some
    websites offer single play, exactly where the user is alone
    playing at the table, or plays against bots, phony players that are controlled by
    a pc.

  26. #26 by www.adubalakonline.com at May 6th, 2019

    You increase all in then he instantly calls and reveals Q-Q.
    Spend at least fifteen minutes viewing the play at each table.
    Re-raises also achieve this same finish. “Checking” is also a
    great technique. This enables the sport to be more unstable as every player interprets the info differently.

    There are a bunch of excuses people believe to be accurate,
    but really nobody actually knows.

  27. #27 by uønsket hårvækst hormoner at May 7th, 2019

    It’s awesome in favor of me to have a website, which is helpful in favor of
    my know-how. thanks admin

  28. #28 by sortie officiel pokemon go at May 7th, 2019

    I have read so many posts regarding the blogger lovers except this article is
    actually a pleasant paragraph, keep it up.

  29. #29 by http://monoflange-valve-oliver88503.collectblogs.com/12594883/fascination-about-monoflange-valve-wiki at May 8th, 2019

    Very good post. I will be dealing with some of these issues as well..

  30. #30 by qkzkfk1 at May 8th, 2019

    This is my first time go to see at here and i am genuinely impressed to read everthing at single place.

  31. #31 by warungbola77.com at May 9th, 2019

    Can I just say what a comfort to uncover somebody that
    genuinely understands what they are talking
    about on the net. You definitely know how to bring an issue to light and make it important.

    More people really need to look at this and understand this side of the story.
    I can’t believe you aren’t more popular because you definitely
    possess the gift.

  32. #32 by Kennith at May 10th, 2019

    Excellent way of explaining, and good article to get facts
    about my presentation topic, which i am going to deliver in college.

  33. #33 by http://www.mids.co at May 10th, 2019

    Article writing is also a excitement, if you be acquainted with then you can write or else it is
    complex to write.

  34. #34 by web page at May 10th, 2019

    I do not even understand how I finished up right here, however I
    thought this submit was good. I don’t recognise who you’re but definitely
    you are going to a well-known blogger if you happen to aren’t
    already. Cheers!

  35. #35 by Viruses at May 11th, 2019

    I do not even know how I ended up here, but I assumed this publish used to be great.
    I don’t recognise who you are however certainly you’re going to a famous blogger when you aren’t already.

    Cheers!

  36. #36 by Lavina at May 11th, 2019

    I am in fact pleased to read this webpage posts which carries plenty of valuable data, thanks for providing these data.

  37. #37 by my site at May 13th, 2019

    Thanks for another fantastic post. The place else
    may just anybody get that type of information in such an ideal means of
    writing? I’ve a presentation next week, and I am at the search for such info.

  38. #38 by GetMyOffer.CapitalOne.com get at May 13th, 2019

    It’s a shame you don’t have a donate button! I’d certainly donate to
    this brilliant blog! I guess for now i’ll settle for
    bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will share this blog with my Facebook group.
    Chat soon!

  39. #39 by co san bong dai thinh phat at May 15th, 2019

    I pay a visit day-to-day some websites and blogs to read articles,
    however this weblog presents feature based posts.

  40. #40 by Zdjęcie na drewnie at May 15th, 2019

    It’s hard to find experienced people about this topic, but you
    sound like you know what you’re talking about!
    Thanks

  41. #41 by extratorrents unblocker.cc at May 16th, 2019

    But you know that’s far from the reality.

  42. #42 by a at May 17th, 2019

    I savor, lead to I discovered exactly what I was looking for.
    You’ve ended my four day long hunt! God Bless you man. Have a great day.

    Bye

  43. #44 by List Agen Bandar Judi Online Terpercaya at May 19th, 2019

    I believe this is one of the such a lot significant information for me.
    And i am satisfied reading your article. However wanna
    remark on few basic things, The site taste is ideal, the articles is in point of fact great
    : D. Good task, cheers

  44. #45 by Layne at May 21st, 2019

    whoah this blog is fantastic i like reading your posts.
    Keep up the good work! You know, a lot of people are looking round for
    this info, you can help them greatly.

  45. #46 by Auto Zubehör at May 21st, 2019

    Ich bin gerade zufaellig auf Ihrer Page gelandet (war
    auf der Suche nach einer anderen Homepage).
    Ich moechte diese Seite nicht verlassen, ohne Dir ein Lob zu dieser gut strukturierten und schick designten Seite zu hinterlassen!

  46. #47 by radio reception at May 22nd, 2019

    I am regular reader, how are you everybody? This article posted at this web page is
    genuinely pleasant.

  47. #48 by leather wallets buy at May 22nd, 2019

    I kno this iif off topic but I’m looking into starting my
    own blog and was wondering whaat all is required to get set up?
    I’m assuming having a blog likoe yours woulkd cot a pretty penny?
    I’m not very web savvy so I’m nott 100% certain. Any recommendations or advice would be greatly appreciated.
    Kudos

  48. #49 by prowadzenie profili at May 24th, 2019

    Nice answers in return of this question with genuine arguments and describing the whole
    thing about that.

  49. #50 by xuong may gia cong quan jeans at May 24th, 2019

    Howdy very cool web site!! Man .. Excellent ..
    Amazing .. I will bookmark your site and take the feeds additionally?

    I’m glad to seek out a lot of helpful info right here
    within the put up, we need work out more strategies in this regard, thanks for sharing.
    . . . . .

(will not be published)