如何获得由ol.interaction snap拍摄的特征?

梅白帆*_*梅白帆 7 openlayers-3

我使用了ol.interaction.snap,但我想得到哪个点被瞄准了?

 snapInteraction = new ol.interaction.Snap({
        source: Source.stationSource
    });
Run Code Online (Sandbox Code Playgroud)

因为没有事件我无法得到哪个点

Don*_* Ch 0

对于绘制交互捕捉,一种方法是 getFeaturesAtPixel,其中像素是 evt.target.downPx_

draw.on('drawstart', (evt) => {
  const featuresAtPixel = map.getFeaturesAtPixel(evt.target.downPx_)          
  console.log('drawstart', evt, featuresAtPixel);
})
Run Code Online (Sandbox Code Playgroud)