This is how I added some base layers to the map. Mapbox and OpenStreetMap are some of them.
var baseLayers = {
"Mapbox Satellite": L.mapbox.tileLayer('mapbox.streets-satellite'),
"Mapbox Streets": L.mapbox.tileLayer('mapbox.streets'),
"Mapbox Outdoors": L.mapbox.tileLayer('mapbox.outdoors'),
"OpenStreetMap Standard": L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution:'<div class="basemap_link" >©\n\
<a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap contributors. </a>\n\
<a href="https://wiki.osmfoundation.org/wiki/Terms_of_Use" target="_blank">Website and API terms</a>\n\
</div>'
})
baseLayers['Mapbox Satellite'].addTo(map);
I added a layer modifier control to the map (top left)
L.control.layers(baseLayers, null, {
position: 'topleft',}).addTo(map);
L.control.locate().addTo(map);
L.control.fullscreen().addTo(map);
I want to create different styles for each layer. How can I check with a condition if one of these brochure layers is selected (marked as a radio button)?