Is there a way to overlay a point sequence using an external xml file 
similar to markers? I'm trying to overlay the boundary for a national park 
(Google rejected my request to add it to the base map), and instead of using 
a sequence from the 1914 boundary, below:

// Set 1914 NP Boundary 
var polyline =new GPolyline([
new GLatLng(46.9961428642273, -121.9161987304688),
new GLatLng(46.9968271255493, -121.8451023101807),
--- skipped points for brevity --
new GLatLng(46.9072866439819, -121.9161987304688),
new GLatLng(46.9961428642273, -121.9161987304688)
],"#ff0000", 1);
map.addOverlay(polyline);

I want to read in the 1971 boundary which has 262 points. I tried variations 
of this:

                // Set 1971 NP Boundary
GDownloadUrl("waterfalls25.xml", function (doc) {
                var xmlDoc = GXml.parse(doc);
   var markers = xmlDoc.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var lat = markers[i].getAttribute("lat");
var lng = markers[i].getAttribute("lng");
var polyline =new GPolyline([
new GLatLng(lat, lng)
],"#0000ff", 1);
map.addOverlay(polyline);
} // Close for
}); // Close Download

which hasn't work. The points are read (checked using point markers) but the 
line doesn't appear. I have 25+ maps to add this block and something like 
this seems easier with a common file which I can edit to globally fix all 
the maps than ~265 lines of code for the code and points. If some can tell 
me if polyline doesn't allow this or point me at examples I'd be grateful.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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.

Reply via email to