Using the BRC Atlas Library
Explore the source of this page and examine the code comments to see how it works. Included on this page:
- Add and remove Leaflet basemap layers programatically
- Add and remove Leaflet overlay layers programatically
Configure basemap layers demo
This demonstration shows how basemap and overlay layers can be added and removed from the Leaflet map programatically. When only one basemap is present, the Leaflet layer control is automatically removed by Leaflet and added again when another basemap or an overlay layer is added. Note you cannot remove a basemap layer if it is the only one displayed.