[英]Modify square and circle using Open layer 3
I am new for Open layer and using open layer 3.I draw square on map using 4 coordinates. 我是开放层和使用开放层3的新手。我使用4个坐标在地图上绘制正方形。 but now I want to edit that square by stretching any of one point but make sure it should not change shape of square(rectangle) to other shape.
但是现在我想通过拉伸一个点中的任何一个来编辑该正方形,但要确保它不应该将正方形(矩形)的形状更改为其他形状。
Right now, I am using ol.interaction.Modify but it's modify only for Point , Linestring and Polygon . 现在,我正在使用ol.interaction.Modify,但仅对Point , Linestring和Polygon进行了修改。
How would I extent this to support modification of circle and square(rectangle)? 我将如何扩展以支持圆形和正方形(矩形)的修改?
It depends what do you mean by modifying square. 这取决于您修改正方形的意思。 You can modify a rectangle with the
modify.interaction
but you can not reshape it. 您可以使用
modify.interaction
修改矩形,但不能对其重塑modify.interaction
。 I guess you mean reshape and not just modify. 我想你的意思是重塑,而不仅仅是修改。 If this is your case , ol3 does not support it out of the box.
如果是这种情况,ol3不支持。 But here there is an extension to do the reshape for every possible geometry (rectangle, polygon etc.) I am not sure whether it supports circles.
但是这里有一个扩展,可以对每种可能的几何形状(矩形,多边形等)进行整形,但我不确定它是否支持圆。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.