react-leaflet
react-leaflet copied to clipboard
Allow customizing which class gets used for `LayersControl`
My company wants to use images inside the LayersControl
, so this is intended to allow customizing the underlying L.Control
class that gets instantiated for the <LayersControl>
provided by this library. Used as
const MyLayersControl = CustomizableLayersControl(class extends L.Control.Layers {
// ....
// You'll likely want to override at least `_initLayout` and `_update`
});
See the added test for an example