Just realized that I never properly thanked you, Michal.  Thanks!!!

On Jan 23, 3:30 am, Michał Biniek <[email protected]> wrote:
> Hi,
>
> you have set array of points as global - so you overwrite points last
> polygon's data.
> Try put var pts = []; to loop instead of making it global, like this:
>
>                 var pts = [];
>                 for (var i = 0; i < points.length; i++) {
>                         pts[i] = new 
> google.maps.LatLng(parseFloat(points[i].getAttribute
> ("lat")),
>                                                                 
> parseFloat(points[i].getAttribute("lng")));
>                 }
>
> Regards,
> Michal Biniek
>
> On 22 Sty, 23:56, PhilR8 <[email protected]> wrote:
>
>
>
> > I've been toying around with the XML tutorial written by Pamela
> > (http://gmaps-samples-v3.googlecode.com/svn/trunk/xmlparsing/
> > downloadurl_info.html) and am trying to do something similar with
> > polygons as well as markers.  Here's what I've been fooling around
> > with so far:
>
> >http://pages.towson.edu/preese/av/multiple_polys_from_xml.html
>
> > There are two polygons (Alabama, Arkansas) that I'd like to see on the
> > map, but instead I only see Arkansas.  I've been searching around the
> > group and figure that this is some sort of "last in a loop" JavaScript
> > bug (I think Ben Appleton posted this 
> > linkhttp://scriptnode.com/article/the-last-in-a-loop-bug/)
> > but I'm still wrestling with how to fix the problem.  Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to