Fix ol layer switching
This commit is contained in:
parent
4e2b6ecdcd
commit
1c9380adb4
@ -362,7 +362,11 @@ export default class OpenLayersApi {
|
|||||||
}
|
}
|
||||||
layerRadio.name = 'layer';
|
layerRadio.name = 'layer';
|
||||||
layerRadio.value = _layer.get('name');
|
layerRadio.value = _layer.get('name');
|
||||||
layerRadio.onclick = (e) => this.switchLayer(e.value);
|
layerRadio.onclick = (e) => {
|
||||||
|
/** @type {HTMLInputElement} */
|
||||||
|
const el = e.target;
|
||||||
|
this.switchLayer(el.value);
|
||||||
|
};
|
||||||
if (_layer.getVisible()) {
|
if (_layer.getVisible()) {
|
||||||
layerRadio.checked = true;
|
layerRadio.checked = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user