How can I get out LatLng a database to work in the cards?

Hello

I'm 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 when you click on, I want a map will appear.

What I try to do is, get the coordinates of a data base and transport them to a card 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 is 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 place it on the next view.

On this view, I get the data in the form of {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 in a new LatLng() like this: LatLng ({data.lat}, {data.lng}), the new show at the map doen't marker and I have errors in FlashBuilder.

My approach is perhaps bad, so if you know a better way to do it I am open to him.

Can you help me solve this problem.

I would be very gratefull if you would help me.

Sincerely, Gerard Weijer

If you are in ActionScript I don't think you need braces, that she should simply be

var latLng:LatLng = new LatLng (Number (data.lat), (data.lng) Number);

(Note the castant in number)

-Tom

Tags: Flex

Similar Questions

Maybe you are looking for

  • HP G60-243CL

    I have to open my old HP 243 CL and I tell myself that while I'm here, I will replace the processor RM72 (with the S1g2 socket).   Will be the recent/most fastest cpu ZM-87 in this system work?  I have upgraded the bios and can't see anything obvious

  • Equium P300-16 t - USB Power Port

    My machine is less than 4 weeks old. I recently bought a usb hub 2.0 4 generic ports for the system. When I plugged in (using the right side rear lane) I got my scanner and a USB connected. The scanner has not been turned on. I found that if I tried

  • Multimedia keys not working not

    Hi, the play/pause and the previous and next on buttons my laptop Envy Touchsmart stopped working this morning. What can I do about it?

  • queue and notifying with state machine

    I'm trying to implement a declarant and a queue to collect data that is running on a state machine in two separate loops.  I'm new to the whole and methods notifier queue and I think I'm really close to make it work as I want.  When I start the compu

  • Windows Media Player is unable to extract one or more tracks from the CD.

    I also got this message "Windows Media Player is unable to extract one or more tracks from the CD" pop up in an attempt to 'Copy' the CD!  I have Windows 7 and had NO problem for several weeks, ripping my music from CD sales in my MUSIC folder.  I go