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 ofLatLngcoordinates. Simple polygons may be defined using a single array ofLatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered intoMVCArrays. Inserting or removingLatLngs from theMVCArraywill automatically update the polygon on the map.
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 should specify one or more arrays ofLatLngcoordinates. Simple polygons may be defined using a single array of one or moreLatLngs. More complex polygons may specify an array of arrays. Any simple arrays are convered intoMVCArrays. Inserting or removingLatLngs from theMVCArraywill automatically update the polygon on the map.
> 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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.