openlayers:实现框选择
选定区域: 没有一
此示例显示如何使用DragBox交互来选择要素。所选特征被添加到选择交互(ol/interaction/Select)的特征覆盖中以突出显示。
使用Ctrl+Drag(Mac上为Command+Drag)绘制方框。
main.js
import GeoJSON from 'ol/format/GeoJSON.js';
import Map from 'ol/Map.js';
import VectorLayer from 'ol/layer/Vector.js';
import VectorSource from 'ol/source/Vector.js';
import View from