Setting a flag to select features
This commit is contained in:
parent
deb1f267ab
commit
4d1b1c9a06
|
@ -37,6 +37,7 @@ import MouseWheelZoom from 'ol/interaction/MouseWheelZoom';
|
|||
import DragZoom from 'ol/interaction/DragZoom';
|
||||
import Select from 'ol/interaction/Select';
|
||||
import Layer from 'ol/layer/Layer';
|
||||
import { selectedStyle } from './selectedStyle';
|
||||
|
||||
const [getState, setState] = createSignal({
|
||||
lon: 0,
|
||||
|
@ -156,6 +157,7 @@ const Map: Component = () => {
|
|||
});
|
||||
features.map((feature) => {
|
||||
const id = feature.get('id');
|
||||
feature.set('isSelected', !feature.get('isSelected'));
|
||||
console.log({ caller: 'clickHandler / feature', event, feature, id });
|
||||
const branch = tree[id];
|
||||
if (branch?.updateHandler) branch.updateHandler(feature);
|
||||
|
|
Loading…
Reference in New Issue