Skip to content

Allow customizing which class gets used for LayersControl - #1092

Closed
someonewithpc wants to merge 1 commit into
PaulLeCam:masterfrom
someonewithpc:custom-layers-control
Closed

someonewithpc wants to merge 1 commit into
PaulLeCam:masterfrom
someonewithpc:custom-layers-control

Conversation

@someonewithpc

Copy link
Copy Markdown

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

@PaulLeCam

Copy link
Copy Markdown
Owner

Thanks but this is something that should be provided as a third-party library

@PaulLeCam PaulLeCam closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants