On Dec 10, 8:52 am, Dave Llorens <[EMAIL PROTECTED]> wrote: > THIS DRAWS A POLYGON > > var polygon = new GPolygon([ > new GLatLng(37.4419, -132.0419), > new GLatLng(47.3419, -122.1419), > new GLatLng(37.4419, -112.2419), > new GLatLng(27.5419, -122.1419), > new GLatLng(37.4419, -132.0419) > ], "#f33f00", 5, 1, "#ff0000", 0.2); > map.addOverlay(polygon);
This is an array of GLatLngs... > > THIS DOES NOT > > var polygon = new GPolygon([ > [37.4419, -132.0419] > [47.3419, -122.1419] > [37.4419, -112.2419] > [27.5419, -122.1419] > [37.4419, -132.0419] > ], "#f33f00", 5, 1, "#ff0000", 0.2); > map.addOverlay(polygon); This is an array of arrays of numbers. > > THIS DOES NOT > > points = [[37.4419, -132.0419], [47.3419, -122.1419], [37.4419, > -112.2419], [27.5419, -122.1419], [37.4419, -132.0419]]; > > var polygon = new GPolygon(points, "#f33f00", 5, 1, > "#ff0000", 0.2); > map.addOverlay(polygon); This is an array of arrays of numbers. > > I want to use an array of points... what the hell am and I doing > wrong? Define "points". It works when you use an array of GLatLngs (which are what I call points). It doesn't work when you don't because the GPolygon constructor expects an array of GLatLngs as its argument. -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to Google-Maps-API@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---