Changing basemap to a gallery_basemaps item

635
2
08-17-2021 12:32 PM
KarenRobine1
New Contributor III

Hello:
I'm using custom basemap's defined as a WebMaps gallery_basemaps (https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html#arcgis.mapping.WebMap.gal...)

According to the example under a WebMaps property, basemap, I should be able to set my webmap to a gallery_basemap item. If I'm creating a new webmap, this works perfectly. However, if I'm updating an existing basemap, it fails saying there is not a gallery-basemaps

ie. 

wm = WebMap(webmap_item)

wm.basemap = <my_unique_basemap_name_from_the_gallery>

Exception: 'WebMap' object has no attribute '_gallery_basemaps'

Ideas?

2 Replies
ChrisWiebke
Occasional Contributor

I am experiencing the same.  How do I add our enterprise portal basemaps to an enterprise portal web map?  Thanks.

0 Kudos
ChrisWiebke
Occasional Contributor

I have attached a notebook in the zip file.

I was able to switch the basemap of a portal webmap to a basemap from another portal web map with the notebook.  Hopefully this will help.  Let me know if you have questions.  Thanks.

0 Kudos