Thomas
Thomas

Reputation: 1706

program google maps undo button behaviour

My program is putting markers on all points of the polylines.

I'm using the insert_at & set_at listeners to update my markers when the user is moving these points to a new location.

Google maps API v3 provides an undo button when drawing a polyline.

It works fine with set_at (repositioning my marker to it's original position); it does however not work with insert_at.

enter image description here enter image description here enter image description here

Is there a way to program behaviour of the undo button so I can remove the marker when using the undo button?

Upvotes: 0

Views: 407

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117364

Observe the remove_at-event, it will fire when the usage of the undo-button will remove a point of the path

Upvotes: 1

Related Questions