On Sat, Nov 21, 2009 at 5:49 AM, arclyte <[email protected]> wrote: > I'm guessing that this is a bug in my code somewhere, but I haven't > been able to figure out where just yet. > > Here is the sample for my current code: > http://arclyte.netdojo.com/geo/polyDraw.php > > If you click on the map you'll start placing markers, or you can click > on the color box next to a polygon to load markers for that polygon > and edit it. > > My polygon is defined as an array of polygons, so the new (green) > polygon is in poly[2]. If you click and add points to the polygon you > can see that the points actually are contained within the object but > the polygon display is not being updated. > > I've found that if I call poly[n].setMaps(map) on the polygon I'm > editing it will redraw and show the new/edited points. But that means > redrawing the polygon each time... I'm afraid that won't scale very > well if we get very large polygons. It also gives a nice flicker > every time you draw a point which I'd rather avoid. >
I see you've tried MVCArray's .insertAt(), which notifies the polygon of a change in its coordinates. But that code is currently commented out. Did that not work? For reference, I use MVCArray's .insertAt() in this polygon editing demo: http://gmaps-samples-v3.googlecode.com/svn/trunk/poly/poly_edit.html -- > > 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=. > > > -- 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=.
