yagajs / leaflet-ng2

Angular.io integration of Leaflet
https://leaflet-ng2.yagajs.org
ISC License
66 stars 26 forks source link

The LayersControlDirective should take into account hidden layers #442

Open jochenjonc opened 4 years ago

jochenjonc commented 4 years ago

Is your feature request related to a problem? Please describe. When a layer within a yaga-layers-control has the display set on false, the checkbox or radiobutton in the yaga-layers-control on screen should be unchecked. At the moment it is checked and for the user to be able to view the hidden layer, the user must first uncheck and then check the layer again.

Describe the solution you'd like A way to tell the yaga-layers-control that a layer is hidden by default and the addTo method should not be called on it. I think the display attribute could be used for that.

Describe alternatives you've considered Solution in Leafet: https://stackoverflow.com/questions/46043995/set-leaflet-overlay-off-in-the-layer-control

atd-schubert commented 3 years ago

Maybe this can be an issue with the 2-way binding. I will take a look at it... Sorry for the delay