Thanks for the bug report, I've prepared a fix. This should go live in the next week or two.
As a temporary workaround, 2 different MVCArrays can contain the same JS Array. For example var coordinates = [...]; // LatLngs var polylinePath = new MVCArray(coordinates); var polygonPath = new MVCArray(coordinates); Then polylinePath and polygonPath can be passed to Polyline and Polygon instances without accidentally closing your Polylines. On Thu, Jan 28, 2010 at 12:55 AM, evilC <[email protected]> wrote: > If you create a polygon from an MVCArray of latlngs, then append nodes > to that MVCArray, the polygon overlay updates to reflect the changes, > all good so far. > > However, if you remove the polygon overlay and create a polyline > overlay using the *same MVCArray*, the resultant polyline is "closed" > like a polygon (There is an extra line from the last node to the > first). > > There is no duplicate node at the end of the MVCArray to "close" the > polygon, this is not the problem. It is something about the MVCArray - > once you pass it to a Polygon constructor, it "closes" the MVCArray > somehow. If I loop through the MVCArray and extract each latlng to > build a new array, the polygon is not closed. > > Does anyone know if there is a way to "un-close" the polyline without > rebuilding the MVCArray? > > TIA > > Clive > > -- > 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]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- 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.
