draw.on('drawend', function () {
var drawInteraction;
map.value.getInteractions().forEach(function (interaction) {
if (interaction instanceof Draw) {
drawInteraction=interaction;
}
});
// 从地图上移除该交互。
if (drawInteraction) { map.value.removeInteraction(drawInteraction); }
});
openlayers中测量多边形面积在draw.on(‘drawned‘,function(){...})中无法通过map.removeInteraction(draw)直接移除的解决方案
最新推荐文章于 2024-05-24 23:45:01 发布