I was surprised to read that the latest version of OpenLayers (ie. 8.2.0) does not have a layer switcher control as in the earlier versions.

After googling it seems that such a control has been nicely provided by a third party, but up to version OL 6 (if I am right).

Can you point to additional working options?


1 Answer 1


The last OpenLayers version that had native layer switcher control was 2.13.1 (see web archive at https://web.archive.org/web/20200701183524/http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Control/LayerSwitcher-js.html). With version 3.0 native layer switcher control disappeared from OpenLayers (see all controls in v3 docs at https://openlayers.org/en/v3.20.1/apidoc/ol.control.html).

Maybe there exists, but I could not find any explanation/justification anywhere on OpenLayers GitHub for omission of layer switcher.

But already with version 3 and up to the latest 8.2.0 there is ol-layerswicher plugin from Matt Walker available that works just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.