When I access a normal array with the method of an MVCArray I get an error Error: points.removeAt is not a function
But it seems I cannot force the polyline to use my own provided MVCArray. The creating of a polyline/polygon seems to include the creation of an implied MVCArray. So there seems no possibility that a polyline and a polygon can share the same MVCArray alternately. On Jun 15, 6:41 pm, Nathan Raley <[email protected]> wrote: > Err sorry, I edited my text and forgot to clear out a line. > > Ignore the line "This clears out the position "pointer" in the array > points." > > The rest should be valid for you. Let me know if that helps you out. > > On Tue, Jun 15, 2010 at 11:40 AM, Nathan Raley <[email protected]> wrote: > > Well if you are wanting to set clear the entire array you should do: > > points = []; > > > This clears out the position "pointer" in the array points. > > > If you want to remove only the last position you do it as: > > points.pop(); > > > If you want to remove a specific element at a specific location you do: > > points.removeAt(i); > > Where i is the position you want cleared out. > > > This help any? > > > On Tue, Jun 15, 2010 at 11:29 AM, Pil <[email protected]> wrote: > > >> On Jun 15, 6:05 pm, Nathan Raley <[email protected]> wrote: > >> > Did you try points = [];? > > >> Yes, this doesn't work when I say > > >> poly.setPath(points); > > >> i.e. no polyline will appear. When I use a MVCArray all works well. > >> The MVCArray should be shared alternately between a Polyline and a > >> Polygon. This all works well - but I found no way to set the elements > >> of the MVCArray to 0. > > >> -- > >> 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.
