mapLine.on('singleclick', function(evt) {
mapLine.forEachFeatureAtPixel(evt.pixel, feature => {
//获取到feature对象
coordinates=feature.geometryChangeKey_.target.flatCoordinates;//获取创建feature坐标
});
}
mapLine.on('singleclick', function(evt) {
mapLine.forEachFeatureAtPixel(evt.pixel, feature => {
//获取到feature对象
coordinates=feature.geometryChangeKey_.target.flatCoordinates;//获取创建feature坐标
});
}