this.parentContainer.hideLayer doesn't work
@DonNicoJs Something is wrong.
<l-map>
<l-layer-group ref="gridImageLayerGroup" :visible="gridImageLayerGroup.visible">
<l-layer-group ref="gridImageLayer" :visible="gridImageLayer.visible"/>
<l-layer-group ref="gridValueLayer" :visible="gridValueLayer.visible"/>
</l-layer-group>
</l-map>
When I set gridImageLayerGroup.visible = false, the gridImageLayer and gridValueLayer are still show.
I find this reason is that :
in LMap.vue
hideLayer(layer) {
if (layer.layerType !== undefined) {
this.mapObject.removeLayer(layer.mapObject);
}
},
Lmap's layerType is undefined. So it doesn't work!
have same issue, my quick fix was to set layerType to some value (e.g. "LMarker") on the components.
I guess someone forgot to set default values for the components...
@hoticer @JohnnyAW I've addressed the issue and publish a new patch version.
I need absolutely to focus on:
Apologies for the very slow update
Most helpful comment
@DonNicoJs Something is wrong.
When I set gridImageLayerGroup.visible = false, the gridImageLayer and gridValueLayer are still show.
I find this reason is that :
in LMap.vue
Lmap's layerType is undefined. So it doesn't work!