Should be something like this I think...
private function onResult(e:ResultEvent):void
{
var list:ArrayCollection = e.result.map.loc;
var arrayObject:Array = new Array();
for(var i:int=0; i<list.length; i++)
{
arrayObject[i] = new LatLng(list[i].lat, list[i].lon);
}
var p:Polyline = new Polyline(arrayObj)
map.addOverlay(p);
}
On Mon, Apr 13, 2009 at 3:22 PM, Ranglo <[email protected]> wrote:
>
> Hi,
>
> I am simply trying to create a polyline from points stored in an XML
> file, I have succeeded with markers but not with a polyline or
> polygon. The code is below, any ideas? Thanks
>
> private function onResult(e:ResultEvent):void
> {
> var list:ArrayCollection = e.result.map.loc;
> for(var i:int=0; i<list.length; i++)
> {
> var p:Polyline = new Polyline([new LatLng(list[i].lat, list
> [i].lon)]);
> map.addOverlay(p);
> }
> }
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---