I am having haard time to load kml file on google map.
I have created an empty array latlngArray where i can push Lat And Lng
one by one.
but its is returning wrong value.
here is the function
var subsource:String = "";
var strSubArray:Array = new Array();
var r:int;
for (r=0;r<Strsource.length;r++)
{
subsource = null;
strSubArray = null;
subsource = Strsource[r];
//Alert.show("0" + subsource[0]);
//Alert.show("1" + subsource[1]);
//Alert.show("2" + subsource[2]);
//Alert.show("3" + subsource[3]);
//Alert.show("4" + subsource[4]);
strSubArray = subsource.split(",");
//Alert.show("0" + strSubArray[0]);
//Alert.show("1" + strSubArray[1]);
//Alert.show("2" + strSubArray[2]);
//Alert.show("3" + strSubArray[3]);
if (strSubArray.length == 3)
{
var latlng:LatLng =
map.getCenter();
var lat:Number = latlng.lat();
var lon:Number = latlng.lng();
lat = strSubArray[0];
lon = strSubArray[1];
var latlngArray:Array = new
Array();
//Alert.show("lat:" + lat + "
lon: " + lon);
latlngArray.push(new
LatLng(lat,lon));
Alert.show("latlngArray:" +
latlngArray);
var Polyopt:PolylineOptions =
new PolylineOptions ({strokeStyle:
new StrokeStyle({color: 0x987654}), fillStyle: new FillStyle({color:
0x223344, alpha: 0.8}),radius: 12, hasShadow: true});
var latlngs:Polyline = new
Polyline(latlngArray,Polyopt);
this.map.addOverlay(latlngs);
}
--
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.