hi,
I am sagar .i having a very serious problem , i need help
urgently , my problem is i am not able to create multiple polylines
on google maps using the flash api.
The url for xml is as follows
http://203.200.218.32/Openlayers/readxml6.xml
Now my requirement is to display each linestring or cordinates of each
points tag in the xml file on the google map , i had been trying on
this for quiet sometime but till now i am not able to get , can anyone
plz help me it will be very helful for me , and the main application
code is as follows .
public function init():void
{
googleMap = new Map();
googleMap.key =
"ABQIAAAAljJJ4mzOKKSE5QjBcK9rkRTzT6jlKLZvwWs60kgTYBDCofdlnxQp0iiZG9JlSlgndpUSE22EY3P-
Fw";
googleMap.addEventListener
(com.google.maps.MapEvent.MAP_READY,googleMap_mapReady);
googleMap.setSize(new Point(mapContainer.width,
mapContainer.height));
googleMap.addControl(new
com.google.maps.controls.ZoomControl());
googleMap.addControl(new PositionControl());
googleMap.addControl(new
com.google.maps.controls.MapTypeControl());
mapContainer.addChild(googleMap);
}
public function googleMap_mapReady(event:MapEvent):void{
googleMap.setCenter(new LatLng(42.94671,-78.76778 ),14);
}
public function handleXML(event:ResultEvent):void{
var employeeInfo:arraycollection = event.result.table.row;
var x:int;
var num1:Number=0;
for(x=0;x<employeeInfo.length;x++)
{
myarray = [];
myarray1 = [];
latlngcoll=employeeInfo.getItemAt(x).points;
myarray = latlngcoll.split(",",latlngcoll.search(","));
for(i=0;i<myarray.length;i++)
{
last=myarray[i].toString();
temp=last.split(" ",last.search(" "));
temp1= temp.reverse();
substr1= temp1[0].toString();
substr2= temp1[1].toString();
lng = parseFloat(substr2);
lat = parseFloat(substr1);
myarray1.push(new LatLng(lat,lng));
}
createAndAddGeometries() ;
}
}
public function createAndAddGeometries() : void
{
polyline = new Polyline(myarray1,new PolylineOptions
({strokeStyle: new StrokeStyle({color: 0xFF0000,thickness: 5,alpha:
0.7})}));
googleMap.addOverlay(polyline);
}
WITH THIS CODE I AM ABLE TO DISPLAY ONLY THE FIRST LINESRTING, CAN ANY
HELP ME. THANKS.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---