Skip to content
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

TiledMapLayer no longer removes itself #1264

Closed
CalebPourchot opened this issue Mar 19, 2021 · 6 comments
Closed

TiledMapLayer no longer removes itself #1264

CalebPourchot opened this issue Mar 19, 2021 · 6 comments

Comments

@CalebPourchot
Copy link

Add a TiledMapLayer
Call layer.remove or map.removeLayer() on the TiledMapLayer
The pane isn't removed from the map.

Looks like it is related to this change #1248 for removing attribution. OnRemove() was added to TiledMapLayer, but the base leaflet version of the function isn't called, so the layer is never removed. At least I think that's what is happening.

esri-leaflet version 2.5.3
leaflet ##1.7.1

@gavinr
Copy link
Contributor

gavinr commented Mar 19, 2021

Thanks for the report! Are you able to create a simplified replication case (using JSBin or similar) for this?

@CalebPourchot
Copy link
Author

CalebPourchot commented Mar 19, 2021 via email

@CalebPourchot
Copy link
Author

Here's a fiddle:
https://jsfiddle.net/juLgmhrk/

notice the attribution gets removed, but the layer doesn't.

Thanks

@jwasilgeo
Copy link
Contributor

jwasilgeo commented Mar 19, 2021

Related to PR #1258 perhaps? If so, then it was fixed and available on esri-leaflet 3.0.1.

#1258

@CalebPourchot
Copy link
Author

That looks like it exactly. Sorry I didn't find it when searching. Just gotta update.

Thanks!

@jwasilgeo
Copy link
Contributor

No problem. This is the best kind of fix! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants