Skip to content

Select

Select 可以用于选择地图上的矢量图形。

点击元素时选中

jsx
import Select from "ol/interaction/Select.js";
import { click } from "ol/events/condition.js";

const selectClick = new Select({
  condition: click,
});
map.addInteraction(selectClick);