I have implemented the below example to show the multiple base layers of map in my application using LeafletJs.
I'm able to successfully implement the same but I'm trying to show same in a single tile image option.
Like for example I have two layers 1. Street Layer 2. Gray scale With the above implementation in getting the below options on the map
Instead I'm trying to implement something like the the one below
So that when the user clicks on the small map icon, it should change the view to the other Layer. As in my case there will always be only two layer.
I have tried to add the pane option but that doesn't seem to be the right option for this behavior. Also I have tried some of the properties mentioned in the below link.
Is this feasible with the existing components of Leaflet?