![](/img/trans.png)
[英]Load Open layers 3 jsonp vector layer with bounding box strategy?
[英]Open Layers Bounding Box Size Restriction
我想限制用戶將邊界框繪制為一定的大小,例如1024 x1024。如何在“開放層3(OL3)”中執行此操作? 謝謝!
您可能會捕獲到drawend事件並進行相應的過濾。
drawInteraction.on("drawend", function(e) {
var feature = e.target.sketchFeature_;
// allow or disallow here, not sure how you can do that.
});
drawInteraction的類型為ol.interaction.Draw
,您的交互幾何類型ol.geom.GeometryType
將為Polygon。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.