openlayers在绘画结束后,打印出几何图形的类型,判断当前几何图形是否为点。
this.lineDraw.on("drawend", function (event) {
console.log(event.feature.getGeometry().getType());
if (event.feature.getGeometry().getType() !== "Point") {
...
}
})
this.map.addInteraction(this.lineDraw);