-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
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
Calling remove() on a map with wms layers #34
Comments
Thanks for the report, we'll take a look when we can. Testing with 1.0.0-rc3 is sufficient as we are primarily targeting 1.0 compatibility. |
Any update on this? Is there a work around on how to manually remove the layer from the map? |
Under
just add this code which is implementation for onRemove() so that the final code looks like:
That enables when using TILED version of WMS service to remove current layer and then you can add another WMS layer to a map. |
Good timing, just came across this problem again today but your solution works. Thanks @mgurjanov |
What's going on with this? There's been a pull request to fix this issue for like 2 years. Can this get merged please? |
This is with Leaflet 1.0.0-rc3 (not tried any other versions):
If you create an instance of Leaflet map and add one or more wms layers, then try to remove the map instance with
map.remove()
an error is generated:Uncaught TypeError: layer.onRemove is not a function
The text was updated successfully, but these errors were encountered: