Actually the code is still the same and it works even with the changed
id.

Also yes I realize that if I were to do (the loop does it. But yes,
"lines" gets overwritten on the second run):
 var lines =
xmlDoc.documentElement.getElementsByTagName("lineTFT001');

it would create an array that holds all of its tags, in my case all
the "point" tags which have the latitiude/longitude coordinates.

Also this is related to work and at this stage, no, I dont have access
to put it up on a real server ye if I did then it would only be on the
intranet - if I did have access to my own server then yes I would as
this is taking up pretty much most of my time and I am spending my
time at home trying to figure this thing out.

So there's no way of instead of making it overwrite the "var lines"
each time the loop goes through but just store it somewhere and use
that to retrirve the tags and hence plot them? I know the first step
would be to remove that "J Loop," but then that would mean everytime I
want to retrieve "tags" of an element such as lineTFT001 I would have
to specifically mention it as I did above and not use a loop to
automate all of it.

Also when I do as a test "alert(pts)"  within the "i loop" it will
return ALL the lat/long coordinates of that particular element that's
in the loop. But when the loop finishes and the "J loop" increments
and repeats whatever data that is in the pts array gets deleted and
replaced with fresh lat/long data.

Actually this just occured to me. How about I modify the "i loop" by
adding/changing to it and leave the remaining code as it is. So I will
have:
var n = 0;
for (var i = 0; i < points.length; i++) {
                                pts[i] = new
GLatLng(parseFloat(points[i]
                                                .getAttribute("latPoly")),
parseFloat(points[i]
                                                .getAttribute("longPoly")));
                        }
do {
            p[n] = new GPolyline(pts,colour,width)  // Make this
initially as p[0] since n=0 and store the GPolyline value for
lineTFT001 into p[0]
            map.addOverlay(p[n]); // Paint the polyline
           n++; // Now increment n
     }
while (n < 12); // Stop this once all the 12 "line segment" latitude/
longitude data has been stored in the 12 arrays of p[0] to p[11].

So now we have when the "J Loop" repeats, another element of the "p
array" will be created and known as p[1] since "n" has incremented
from the initial 0 to a 1. The values for lineTFT002 will now be
stored into p[1] and etc.

And now  technically I should simply be able to modify any "line
segment" via just referencing the lineIndex value which I am
interested in. (eg. lineTFT001 will have index of 0, lineTFT002 will
have an index of 1 and etc up till lineTFT012)

Example. For lineTFT001
p[0].setStrokeStyle({color: col});

And for lineTFT002
p[1].setStrokeStyle({color: col});

and etc...

This s just straight off the top of my head...

-- 
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