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

Add basemap model_id to Map._layer_ids attribute #1208

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

giswqs
Copy link
Contributor

@giswqs giswqs commented Jun 13, 2024

When initializing the Map with a basemap, the basemap model_id is not added to the Map._layer_ids attribute, resulting in an error when trying to removing the basemap from the map. This PR fixes the bug by adding the basemap layer id to the Map._layer_ids attribute

import ipyleaflet
m = ipyleaflet.Map()
m
m.remove(m.layers[0])

image

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou merged commit 1126449 into jupyter-widgets:master Jun 14, 2024
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants