[GIS] How to select multiple Features from multiple Layers in OpenLayers

featuresgetfeatureinfoopenlayers-2select

Is there a way to select multiple features from multiple vector layers by using clickTolerance in click?
I checked the documents of getFeature control and selectFeature control, seems not work in this way.

I know that it is possible to select multiple features by holding down Shift key. That's OK in a desktop environment, but it's not desirable in mobile/tablets. So I'm looking for a different solution.

Best Answer

This example should show you exactly what you need.

https://openlayers.org/en/latest/examples/select-multiple-features.html