howord
howord

Reputation: 97

How to implement redo of draw interaction in openlayers?

In the case of undo, this is implemented using drawInteraction.removeLastPoint().

https://openlayers.org/en/latest/examples/draw-features.html

But I don't know how to implement redo.

The redo function should be available when drawing interaction is active.

Should I use "setGeometry"?

Upvotes: 1

Views: 435

Answers (1)

howord
howord

Reputation: 97

I found append Coordinates in openlayers api.

drawinteraction.appendCoordinates([coordinate]);

Upvotes: 1

Related Questions