When calling removeLayer() from within map.on event the baselayer menu gets a bit wonky. After removing even a single layer I can click thru the baselayers top to bottom just fine, but going out of order clicking at random requires I click the radio button twice. This also seemed to happen with overlay layers, requiring two clicks to check the box.
map.on('baselayerchange', (e) => {
control.removeLayer(somelayergrouphere);
}
Removing a layer outside of the map.on event works as expected, the menu doesn't get wonky.
When calling
removeLayer()from withinmap.onevent the baselayer menu gets a bit wonky. After removing even a single layer I can click thru the baselayers top to bottom just fine, but going out of order clicking at random requires I click the radio button twice. This also seemed to happen with overlay layers, requiring two clicks to check the box.Removing a layer outside of the
map.onevent works as expected, the menu doesn't get wonky.