Skip to content

lcalisto/ol-layer-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Layer control for OpenLayers 3.x and above

Example on how to create a layer control in OpenLayers 3.x and above. This example uses OpenLayers 4.2.0.

This example adds a layer control to the map.

Running the App

Just check the index.html for details.

A live example in :

https://htmlpreview.github.io/?https://github.com/lcalisto/ol-layer-control/blob/master/index.html

Notes

In order to make this layer control work, make sure you add basemap:boolean and name:text to your layers object.

To add the layer control

The main function to add the control is:

showLayersControl()

To remove the control

Function removeLayersControl() removes the layer control.

removeLayersControl()

About

Layer control for Openlayers 3.x and above

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages