如何通过单击其内部 space 来 select 多边形

How to select a polygon by click its internal space

我做了一个 Select 就像 openlayers 的例子:

this.select = new Select()
this.map.addInteraction(this.select)
this.selectedFeatures = this.select.getFeatures()

但我只能在其边界处 select 多边形。单击内部 space 时如何 select 多边形?

Select:

style Style for the selected features. By default the default edit style is used (see module:ol/style).

默认编辑样式仅“突出显示”边界,但您可以创建不同的样式:

this.select = new Select({
    style: new Style({
        fill: new Fill({
            color: [0, 0, 255, 0.5]
        })
    })
});
this.map.addInteraction(this.select);

这是一个工作演示:

https://anatolysukhanov.com/Whosebug/openlayers/4-select.html