[英]Openlayers implement undo feature modify
I'm using openlayers,我正在使用开放层,
Already I can set feature structure by using modify我已经可以使用修改来设置功能结构
and now trying to reset feature structure to the first structure, before modify.现在尝试在修改之前将特征结构重置为第一个结构。
I guess I need to save geometry coordinates before modify我想我需要在修改之前保存几何坐标
and then setGeometry by the saved geometry coordinates when click on undo;然后在单击撤消时通过保存的几何坐标设置几何;
You can have a look at ol-ext UndoRedo features: https://viglino.github.io/ol-ext/?q=undoredo Specially this example show you how to: https://viglino.github.io/ol-ext/examples/interaction/map.interaction.undoredo.html Be aware the undo/redo is a bit tricky...您可以查看 ol-ext UndoRedo 功能: https ://viglino.github.io/ol-ext/?q=undoredo 这个示例特别向您展示了如何: https ://viglino.github.io/ol- ext/examples/interaction/map.interaction.undoredo.html请注意撤消/重做有点棘手......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.