HI, i want display multiple polylines but when read the xml is not
showed ..
var tracking =
"["+markers[i].getElementsByTagName("displayPoints")
[0].childNodes[0].nodeValue+"]";
var trackingName =
markers[i].getElementsByTagName("displayPointsName")
[0].childNodes[0].nodeValue;
var poly = setOver(tracking);
function setOver(flightPlanCoordinates)
{
var flightPath = new google.maps.Polyline({
path: flightPlanCoordinates,
strokeColor: "#000099",
strokeOpacity: 1.0,
strokeWeight: 2
});
flightPath.setMap(map);
}
this code work fine!!
setOver(flightPlanCoordinates);
var flightPlanCoordinates = [
new google.maps.LatLng(-12.0452358, -77.0305699), new
google.maps.LatLng(-12.0452365, -77.0305699), new
google.maps.LatLng(-12.0489947, -77.0387506), new
google.maps.LatLng(-12.0673559, -77.0370769), new
google.maps.LatLng(-12.1417531, -77.0194816)
];
<?xml version="1.0" encoding="UTF-8" ?>
- <markers>
- <marker>
<thisLat>-12.1417531</thisLat>
<thisLng>-77.0194816</thisLng>
<displayPoints>new google.maps.LatLng(-12.0452358, -77.0305699), new
google.maps.LatLng(-12.0452365, -77.0305699), new
google.maps.LatLng(-12.0489947, -77.0387506), new
google.maps.LatLng(-12.0673559, -77.0370769), new
google.maps.LatLng(-12.1417531, -77.0194816)</displayPoints>
<displayPointsName>point1</displayPointsName>
</marker>
- <marker>
<icon>img/taxi-yellow.gif</icon>
<thisLat>-12.08493</thisLat>
<thisLng>-76.97682</thisLng>
<displayPoints>new google.maps.LatLng(-12.085013, -76.923539), new
google.maps.LatLng(-12.08493, -76.97682)</displayPoints>
<displayPointsName>point2</displayPointsName>
</marker>
</markers>
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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?hl=en.