简体   繁体   English

使用开放层3修改正方形和圆形

[英]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,但仅对PointLinestringPolygon进行了修改。

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.

相关问题 使用`useNativeDriver`在React-native中将圆形动画化为带有圆边的方形 - Animating circle to square with rounded edges in React-native using `useNativeDriver` 使用 cep/Javascript 在 Photoshop 中的新图层上绘制圆圈 - Draw circle on a new layer in Photoshop using cep/Javascript 检测圆形和方形之间的碰撞 - Detecting collision between circle and square 如何在不使用 SVG 图像的情况下使用带有文本的 React 创建圆形/方形形状? - How to create circle/square shapes using React with text inside them without using SVG images? 使用CSS / Javascript保持宽高比的同时在非正方形图像上使用圆形蒙版 - Circle Mask on Non-Square Image while Maintaining Aspect Ratio using CSS/Javascript KineticJS在图层中移动或移除圆 - KineticJS moving or removing a circle in a layer Openlayers在OpenStreetMaps图层上圈出Polygon - Openlayers circle Polygon on OpenStreetMaps layer 如何使用React-Native为Mapbox使用ShapeSource和Circle层显示动态检索的GeoJSON - How to show dynamically retrieved GeoJSON using a ShapeSource and Circle layer for Mapbox using React-Native 开方括号数组 - Open square bracket array 单击“打开图层”中的图层时的回调 - Callback on clicking a layer in Open Layer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM