You should probably be looking at using the setPath method (or path option
in PolygonOptions)

I've filed a bug internally - this is a pretty easy fix.

On Thu, Jun 9, 2011 at 4:41 AM, Andre Tannus <[email protected]> wrote:

> Thanks for the input.
>
>
> On Wed, Jun 8, 2011 at 12:24 PM, Andrew Leach <[email protected]>wrote:
>
>> On 8 June 2011 16:15, Andre Tannus <[email protected]> wrote:
>> > Hi folks,
>> > A while back I had some trouble with Polygons nor rendering from one day
>> to
>> > the next.
>> > Uncaught TypeError: Cannot set property 'Lb' of undefined
>> > I've been investigating this on and off for a few weeks now, and I have
>> > found the problem.
>> > It happens when you try to instantiate a new google.maps.Polygon()
>> passing
>> > in {paths: []}. This used to work on 3.3, but on 3.5 (and perhaps 3.4?),
>> > paths cannot be an empty array. The odd thing is that it CAN be an array
>> of
>> > empty arrays!
>>
>> > Although this isn't too big an issue, it does seem like a bug since the
>> > documentation for google.maps.PolygonOptions says:
>> >
>> > Paths: The ordered sequence of coordinates that designates a closed
>> loop.
>> > Unlike polylines, a polygon may consist of one or more paths. As a
>> result,
>> > the paths property may specify one or more arrays ofLatLng coordinates.
>> > Simple polygons may be defined using a single array of LatLngs. More
>> complex
>> > polygons may specify an array of arrays. Any simple arrays are convered
>> > into MVCArrays. Inserting or removing LatLngs from the MVCArray will
>> > automatically update the polygon on the map.
>>
>> I don't think it's a bug. The documentation clearly says that at least
>> one array of points is needed, and supplying an empty array doesn't
>> provide anything. Nowehere does it say that you can start with no
>> points; indeed, it implies that you must start with a real polygon.
>>
>> An error caused by [] is not a bug. The fact that [[]] doesn't cause
>> an error is a bonus.
>>
>> --
>> 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.
>>
>>
>
>
> --
> --
> A ciência consiste em perturbar um sistema e analisar sua reação. Eu, sou
> uma perturbação.
>
> André Tannús
>  Chef, Cook, Solution Designer and Developer at Epungo
> [email protected]
> +55 11 8053-7636
> +55 11 2389-4360
>
> "Somewhere, something incredible is waiting to be known."
> Carl Sagan
>
>
>
>  --
> 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.
>



-- 
http://twitter.com/broady

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