このプランカーでは、interaction.Draw を使用してポリゴンを作成しました。ポリゴンが完成すると、ポリゴンの範囲内のすべてのフィーチャ ポイントが検出され、それらが選択されます。
プランカーへのリンクはこちら
draw.on('drawend',...
リスナーの抜粋は次のとおりです。
draw.on('drawend', function(e) {
e.preventDefault();
//stop a click select from overriding selection made by polygon
setTimeout(function(){
select.setActive(true)
},300);
// features that intersect the box are added to the collection of
// selected features, and their names are displayed in the "info"
// div
var extent = e.feature.getGeometry().getExtent();
//pointsLayer is the vector layer with the point features
pointsLayer.getSource().forEachFeatureIntersectingExtent(extent, function(feature) {
selectedFeatures.push(feature);
});
});