How can i get LatLng out of a database to work in maps?

Hello,
I am struggeling with a problem with a project of mine for several months now.
In Flash Builder i have a Flex Mobile Project with a list and on click, i want a map to show up.
What i try to do is, get the coordinates from a database and transport it to a map on a mobile device.
This is my sample code :
protected function onMapReady(event:MapEvent):void
                                        map.setCenter(new LatLng(53.207208,5.913611), 14, MapType.NORMAL_MAP_TYPE);
                                        var markerA:Marker = new Marker( new LatLng(53.207208,5.913611)  );
                                        map.addOverlay(markerA);
                                        map.addControl(new ZoomControl());
                                        map.addControl(new PositionControl());
                                        map.addControl(new MapTypeControl());
                                        startGPS();
I get my lat and lng from the database and push it to the next view.
On this view i  get the data as {data.lat} and  {data.lng}.
If i put this in a textfield it works:    <s:Label y="100" left="10" right="10" text="{data.lat},{data.lng}"/>
But if i try to put it in a new LatLng() like this: new LatLng({data.lat},{data.lng}), the marker doen't show in the map and i have errors in FlashBuilder.
Maybe my approach is wrong, so if you know a better way to do it i am open to it.
Can you help me to solve this problem.
I would be very gratefull if you would help me.
Sincerely, Gerard Weijer

Thank you very much!!!.. It works..
But now i have 2 markers and i want the route to be shown as an blue line in between the markers...
This code produces the 2 markers:
protected function onMapReady(event:MapEvent):void
                                        map.setCenter(new LatLng(data.lat,data.lng), 14, MapType.NORMAL_MAP_TYPE);
                                        var markerA:Marker = new Marker( new LatLng(data.lat,data.lng) );
                                        map.addOverlay(markerA);
                                        map.addControl(new ZoomControl());
                                        map.addControl(new PositionControl());
                                        map.addControl(new MapTypeControl());
                                        startGPS();
                              protected function startGPS():void {
                                        if(Geolocation.isSupported){
                                                  geoLocation = new Geolocation();
                                                  if(geoLocation.muted){
                                                  geoLocation.setRequestedUpdateInterval(3000);
                                                  geoLocation.addEventListener(GeolocationEvent.UPDATE, handleLocationRequest);     
                                        } else {
                                                 // turn on gps!
                              private function handleLocationRequest(event:GeolocationEvent):void {     
                                        map.setCenter(new LatLng(event.latitude,event.longitude));   
                                        var markerB:Marker = new Marker(
                                                  new LatLng(event.latitude,event.longitude));
                                        map.addOverlay(markerB);

Similar Messages

  • I have an Retina display MacBook Pro with HMDI out port. I also have an HDMI to Component cable with Audio Plugs. How can I get HDMI out to work with this cable when plugged into the Component and Audio ports on my TV?

    I have an Retina display MacBook Pro with HMDI out port. I also have an HDMI to Component cable with Audio Plugs. How can I get HDMI out to work with this cable when plugged into the MacBook Pro and connected to the TVs Component and Audio in ports.

    Will not work.  To my knowledge, dual converting like that isn't supported.  The Mac must detect the connected video output device and that sort of info cannot be done across an analog component uni-directional connection.

  • My iphone is in recovery mode and i cannot restore it with itunes on my macbook or my pc. how can i restore my iphone 4s? or at least, how can i get it out of recovery mode?

    i tried to restore my iphone 4s because it kept saying "searching..." for service so i decided to restore it, after having already reset all network settings, and after trying to restore all settings. still, it only said "searching..." for service. finally, i tried to restore my iphone.  when using my macbook, 3/4 through i recieved a message to update my itunes software.  i had to close itunes for the update. when i closed itunes, the iphone restore was in pprogress and having to close the program put my phone into this "recovery mode" with the icon of the usb and the itunes disc logo. i also tried updating and restoring the software with my pc which also didnt work. help?

    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    kevinpowell1 wrote:
    how can i get it out of recovery mode?
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    Then See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    Some users have reported as many as 8 or 9 attempts were necessary before success.
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766
    If the issue persists...
    Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • I have a DVD stock in my Imact and the finder does not recognice it. How can I get it out?

    I have a DVD stock in my Imact and the finder does not recognice it. How can I get it out?

    Hold down the mouse button when shutting down,  If that doesn't work, try holding the Mac sideways and shaking gently, then if you see the edge of the disc, use tweezers to pull it out.

  • The charging cable now longer fits all the way in the charging port.  I can't see if any lint is in there, but if there is how can I get it out?

    the charging cable now longer fits all the way in the charging port.  I can't see if any lint is in there, but if there is how can I get it out?

    Go to the Music section of your Library (very top-left corner) and see if your songs are there. The "Purchased" playlist may have been deleted or gotten corrupted, but if that happens it's not a big deal because your music should still be in your main Music Library.
    If your music is NOT in the Music section of your Library, then go to the iTunes Store homepage and find the Quick Links list on the right side. At the top of that list, click Purchased and you can redownload all of your previous content that you might have lost.

  • My charger is stuck in USB port of my car , how can I get it out without damaging either ?

    The charger that came with my iPhone 5c is now stuck in the USB port of my car. How can I get it out without damaging either?

    Use this article: If you can't update or restore your iOS device - Apple Support
    Best of luck!  And since you didn't back up your data previously, all your data is lost.  Make sure to use the free backup services of iCloud or iTunes.
    iOS: How to back up and restore your content - Support - Apple - http://support.apple.com/kb/HT1766

  • My phone and ITunes is now in a Productivity box, how can I get it out?

    My iPhone has developed a Productivity Box and has my phone and iTune's in it, how can I get it out of that box?

    I don't have a clue what you mean.

  • Saved a few images to Dashboard. How can I get them out of there and save them to a file? Thanks

    Saved a few images to Dashboard. How can I get them out of there and saved to a file? Thanks

    I'm sorry, I'm lost & don't even know what to ask.
    Oh wait, open Dashboard in Applications, do the Pics show there?
    http://techland.time.com/2013/01/22/the-slow-but-almost-certain-demise-of-apples -os-x-dashboard/

  • Since I joined creative cloud, I have not been able to sync. Why the difference? Worked good during initial trial. Also I had installed the Mosaic app before Lightroom mobile came out and I cannot seem to get rid of it. How can I get mosaic out? I have ca

    Since I joined creative cloud, I have not been able to sync. Why the difference? Worked good during initial trial.
    Also I had installed the Mosaic app for ipad before Lightroom mobile came out and I cannot seem to get rid of it. How can I get mosaic out? I have cancelled, I have deleted, I have looked through the files for visible remnants.

    The sync count is 60 and static. The total number synced so far is 500+. None have been synced from the ipad except for corrections made there on those already synced.
    I have deleted the Mosaic app from all machines and checked the library folder and have contacted the Mosaic tech support and they have discontinued my subscription. I still get mosaic messages on initiating Lightroom and sometimes at closing.
    I have not tried to sync fewer yet, but some catalogs that I have tried are smaller numbers. Initially, it did well on good connections. Nothing works on my home connections over satellite.

  • I inserted a mini CD (3") and it will not eject, how can I get it out??

    I inserted a mini CD (3") and it will not eject, how can I get it out??  I tried a little shaking, and restarting and holding the mouse pad down.  I heard the spinning but still cannot eject or read the disc.

    Short of taking it to a repair shop for extraction,  you can shut it down and try shaking the devil out of it.

  • İ have an hp 3052 all in one.how can i get print out with ipad or iphone?

    İ have an hp 3052 all in one.how can i get print out with ipad or iphone?

    Hello,
    Try following the instructions here http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02623193&cc=ad&dlc=en&lc=en&jumpid=reg_r1002_us...
    If that does not help, let me know and I will see what I can do.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • What is going on with Apple? I've just downloaded their Mavericks and my computer is performing so badly, I'm wondering if Mavericks is some sort of diabolical malware! How can I get Mavericks out of my computer?

    What is going on with Apple? I've just downloaded their Mavericks and my computer is performing so badly, I'm wondering if Mavericks is some sort of diabolical malware! How can I get Mavericks out of my computer?

    What is your year and specs of your Mac Pro?
    How much RAM installed?
    How full is your Mac's hard drive?
    Do you run any antivirus software on your Mac? Antivirus software can slow down the normal operation of OS X and have negative effects on system performance.
    Do you have apps like MacKeeper or any other maintenance apps like CleanMyMac 1 or 2, TuneUpMyMac or anything like these apps, installed on your Mac?
    These types of apps, while they appear to be helpful, can do too good a job of data "cleanup" causing the potential to do serious data corruption or data deletion and render a perfectly running OS completely dead and useless leaving you with a frozen, non-functional Mac.
    Plus, these type of apps aren't really necessary.
    They really aren't.
    There are manual methods to clear off unnecessary data off of your Mac that are safer and you have complete control over your Mac and not just leave a piece of auto cleaning software in charge of clearing off data off of your Mac.
    These apps potential of causing OS X issues outweighs the implied good and benefits these types of hard drive or memory "cleaning" apps are written to do.
    Plus, the software company's that write these apps make it hard to easily uninstall these apps if something DOES go wrong and these apps work in a way where you have no recovery or revert function to return your Mac back to its former, working state in the event something does go wrong.
    It is best to never download and install these types of apps.
    The risk to your system and data is too great a risk!

  • How can I get HDMI out from my macbook air(2011)?

    How can I get HDMI out from my macbook air(2011)?

    It's rather simple. Buy a Mini DisplayPort to HDMI adapter. And then a HDMI cable long enough to link your computer the distance between both devices.
    Adapter
    http://store.apple.com/us/product/H1824ZM/A/Moshi_Mini_DisplayPort_to_HDMI_Adapt er?mco=MTY3ODQ5OTY
    Example Cable (buy longer one, if needed) You can these practically anwhere that sells HP TV's
    http://store.apple.com/us/product/MC838ZM/A?mco=MTY3ODQ5OTY

  • How can I get hdmi out from 2006 macbook pro?

    How can I get hdmi out from 2006 macbook pro?

    You will need something like this:
    http://www.amazon.com/DVI-HDMI-Cable-6ft-Male-Male/dp/B0002CZHN6/ref=sr_1_3?ie=U TF8&qid=1363820878&sr=8-3&keywords=dvi+hdmi
    Ciao.

  • How can I get my HP Officejet Pro 8100 to work. I had HP  on the phone for over two hours and thought it was fixed. Now it just will not print at all.

    How can I get my HP Officejet Pro 8100 to work.
    I'm using an  iMac (21.5-inch, Late 2013) running Yosemite. I spent hours on the phone with HP who did their best and thought they had solved the problem Now it has stopped printing completely. Just says 'idle' or' connecting to printer' but never does.

    Greetings paulr.paulr,
    Welcome to the Apple Support Communities!
    I understand that you are unable to print from your Mac running Yosemite on your HP Officejet Pro 8100. I know that printer issues can be very frustrating, but I believe the information in the attached article will be able to assist you. I would suggest reading over and systematically working your way through the suggested troubleshooting steps located in the following article. If any issues arise as you work your way through the steps, or if you work your way completely to the end and reset the printing system and the issue continues, please let me know. 
    OS X Yosemite: Printing troubleshooting
    Cheers,
    Joe

Maybe you are looking for