provide a link to..? If you mean to the source code on my server, I can't do that as I haven't done any security features yet.. someone could easily wipe the directory. Anyway, what you suggested worked, thanks.
On Dec 13, 10:49 am, "warden [Andrew Leach - Maps API Guru]" <[email protected]> wrote: > On Dec 13, 4:33 pm, "[email protected]" <[email protected]> > wrote: > > > Thexmlis a simple storage, each lot has an i number of vertexes > > stored <lati></lati><loni></loni> where i is the index for that lots > > range of vertexes. I want to take this data and draw apolygon. This > > is what I figured it would be.. > > It's an array of GLatLngs, as you are constructing. It's not easy to > debug a code listing, but your code seems to be ok, except for > > polyPoint = new GLatLng( > x[0].getElementsByTagName("lat"+(j+1))[0].childNode[0].nodeValue, > x[0].getElementsByTagName("lon"+(j+1))[0].childNodes[0].nodeValue ); > > because those nodeValues are strings, and GLatLng needs numbers. Use > parseFloat() to make numbers. > > You would probably be better off using a structure like > <points> > <point lat="x" lon="y"> > <point lat="x1" lon="y1"> > <points> > or > <points> > <point> > <lat>x</lat> > <lon>y</lat> > </point> > <point> > <lat>x1</lat> > <lon>y1</lon> > </point> > <points> > rather than individually numbered elements. You can then use > getElementsByTagName and loop through the array of point elements. > > However the structure you have may well work if you convert to > numbers. If you can't get it to work, please provide a link as > requested in the posting guidelines. It's far easier to debug > something in a browser with Firebug. > > Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
