Fix ol layer switching

This commit is contained in:
Bartek Fabiszewski 2019-12-06 19:35:48 +01:00
parent 4e2b6ecdcd
commit 1c9380adb4

View File

@ -362,7 +362,11 @@ export default class OpenLayersApi {
}
layerRadio.name = 'layer';
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()) {
layerRadio.checked = true;
}