Skip to content

Add basemap model_id to Map._layer_ids attribute#1208

Merged
martinRenou merged 1 commit intojupyter-widgets:masterfrom
giswqs:layer-id
Jun 14, 2024
Merged

Add basemap model_id to Map._layer_ids attribute#1208
martinRenou merged 1 commit intojupyter-widgets:masterfrom
giswqs:layer-id

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
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