We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have noticed that both methods below only works when layer is added to a map directly and not to a group
panelLayers.removeLayer(toRemove) or toRemove.removeFrom(maps[mapId])
panelLayers.removeLayer(toRemove)
toRemove.removeFrom(maps[mapId])
function addLayer(mapId, layer, layerId) { layer.id = layerId; layers[mapId].push(layer); layer.addTo(maps[mapId]); } function addLayerToGroup(groupId, layer, layerId) { layer.id = layerId; for (var i = 0; i < panelLayers._layers.length; i++) { if (panelLayers._layers[i].id == groupId) { layers[mapId].push(layer); panelLayers._layers[i].layer.addLayer(layer); } } }
How to properly remove layer from the map when layer is in a group?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have noticed that both methods below only works when layer is added to a map directly and not to a group
panelLayers.removeLayer(toRemove)
or
toRemove.removeFrom(maps[mapId])
How to properly remove layer from the map when layer is in a group?
The text was updated successfully, but these errors were encountered: