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 DragZoom from 'ol/interaction/DragZoom';
|
||||||
import Select from 'ol/interaction/Select';
|
import Select from 'ol/interaction/Select';
|
||||||
import Layer from 'ol/layer/Layer';
|
import Layer from 'ol/layer/Layer';
|
||||||
|
import { selectedStyle } from './selectedStyle';
|
||||||
|
|
||||||
const [getState, setState] = createSignal({
|
const [getState, setState] = createSignal({
|
||||||
lon: 0,
|
lon: 0,
|
||||||
|
@ -156,6 +157,7 @@ const Map: Component = () => {
|
||||||
});
|
});
|
||||||
features.map((feature) => {
|
features.map((feature) => {
|
||||||
const id = feature.get('id');
|
const id = feature.get('id');
|
||||||
|
feature.set('isSelected', !feature.get('isSelected'));
|
||||||
console.log({ caller: 'clickHandler / feature', event, feature, id });
|
console.log({ caller: 'clickHandler / feature', event, feature, id });
|
||||||
const branch = tree[id];
|
const branch = tree[id];
|
||||||
if (branch?.updateHandler) branch.updateHandler(feature);
|
if (branch?.updateHandler) branch.updateHandler(feature);
|
||||||
|
|
Loading…
Reference in New Issue