如何在openlayers中绘制一个扇区?

时间:2017-07-06 09:53:41

标签: openlayers

我尝试使用ol.style.RegularShape,但它只能绘制三角形和正方形。

 image: new ol.style.RegularShape({
     radius: radius,
     angle: 90,
     stroke: new ol.style.Stroke({
         color: color
     }),
     fill: new ol.style.Fill({
         color: color
     }),
     points: 3,
     rotation: 0.6
 })

我该如何解决? 喜欢 enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用ol.geom.Polygon。放置要绘制的多边形的坐标。如果要通过单击绘制多边形,请将ol.interaction.draw<%#GetHtmlForUserName(Eval("Username"))%>

一起使用

绘制样本here

相关问题