Select to view content in your preferred language

arcgis.mapping.WebMap basemap property not working

775
2
01-03-2022 08:31 PM
AldwinGregorio
Occasional Contributor

Hi, 

I am trying to change the basemap of a WebMap portal item using the ArcGIS API for Python (1.9.1 version). It is indicated in this link arcgis.mapping.WebMap.basemap that we should use basemap property to set new basemap using Item object. 

AldwinGregorio_0-1641270124380.png

Upon setting a portal item as basemap using basemap property of WebMap object, I'm getting this error. 

AldwinGregorio_1-1641270189868.png

Here is my code where  bm_item is an Item object. Is this an issue with the API version? 

AldwinGregorio_2-1641270237148.png

Thank you! 

 

2 Replies
ChrisWiebke
Regular 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
WengNg4
Emerging Contributor

Having the same issue as OP, the code snippets on arcgis.mapping module | ArcGIS API for Python doesn't work.

 

0 Kudos