vue-leaflet / Vue2Leaflet

Vue 2 components for Leaflet maps
https://vue2-leaflet.netlify.app
MIT License
1.95k stars 379 forks source link

[LControlLayers] - remove IN the LControlLayers a specific layer #592

Closed AlexisJEAN closed 4 years ago

AlexisJEAN commented 4 years ago

Hello,

To explain rapidly, I'm developing a tool based on vue2-leaflet, in this tool I have different layers (type : base and overlay). The goals of this tool is to visualize how sportsman practice sport, so I use cartographic server (GeoServer) to generate different result and I show it thanks the LWMSTileLayer.

The problem is that I don't want show in the LControlLayers the result, because I have already a lot of layers (6 base and 6 overlay). I would like managed manually the layers in the LControlLayers.

Currently, I don't find the way to remove a layer in the control layer. Is it possible ? If is it, could you explain how.

I hope that I explain clearly, Thanks Alexis

DonNicoJs commented 4 years ago

@AlexisJEAN You may want to use a custom L-control for this and some custom code, since this is a question why don't you hop in in our discord server? Link in the main README