branflake2267 / GWT-Maps-V3-Api

GWT Maps V3 Javascript Bindings
Other
144 stars 113 forks source link

Polyline, Circle, Polygon - hide undo image while editing #133

Open wikiro opened 11 years ago

wikiro commented 11 years ago

please create function to hide this image, thank you

http://code.google.com/p/gmaps-api-issues/issues/detail?id=4013 http://stackoverflow.com/questions/11157332/hide-the-undo-button-when-editing-shapes-with-google-maps-api-v3

branflake2267 commented 11 years ago

Seems like adding supressUndo might be doable. Thanks for reporting.

twistedpair commented 11 years ago

Given that this is a defect in the official API, any undocumented hacks applied here would simple make this implementation more brittle. I'd again assert that the point of this project is not to alter the official API, but to provide GWT bindings.

FWIW, in my own implementations, I prefer to listen to the many mouse events on the Polyline to detect any and every change and implement my own undo stack. Since the Polyline is an MVCObject, you may also be able to bind to the vertex array to get changes when they occur, but I've not worked with that pattern much, so no guarantees.

Keep any eye on the official GMaps changelog as they are fixing bugs/ add features continuously.