react-leaflet icon indicating copy to clipboard operation
react-leaflet copied to clipboard

Allow customizing which class gets used for `LayersControl`

Open someonewithpc opened this issue 10 months ago • 0 comments

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

someonewithpc avatar Sep 04 '23 19:09 someonewithpc