Hi, trying to add a service as basemap to a web map with python (manually i can do this analogue screenshot below).
Unfortunately i don't find any example how to do this.
thanks for any help.
Solved! Go to Solution.
I found a solution by further testing:
wm = WebMap()
wm.basemap.clear()
wm.basemap.baseMapLayers[0].clear()
webAtlasDe = '{"id": "WebAtlasDE_1637","layerType": "ArcGISTiledImageServiceLayer","url": "https://myserver.de/arcgis/rest/services/WebAtlasDE/ImageServer","visibility": true,"opacity": 1,"title": "WebAtlasDE"}'
wm.basemap.baseMapLayers[0].update(json.loads(webAtlasDe))
wm.basemap.update({'title':'WebAtlasDE'})
webmap_item_properties = {'title':'WebAtlasDE', 'snippet':license_text, 'tags':['basemaps'}
service = wm.save(webmap_item_properties)
I found a solution by further testing:
wm = WebMap()
wm.basemap.clear()
wm.basemap.baseMapLayers[0].clear()
webAtlasDe = '{"id": "WebAtlasDE_1637","layerType": "ArcGISTiledImageServiceLayer","url": "https://myserver.de/arcgis/rest/services/WebAtlasDE/ImageServer","visibility": true,"opacity": 1,"title": "WebAtlasDE"}'
wm.basemap.baseMapLayers[0].update(json.loads(webAtlasDe))
wm.basemap.update({'title':'WebAtlasDE'})
webmap_item_properties = {'title':'WebAtlasDE', 'snippet':license_text, 'tags':['basemaps'}
service = wm.save(webmap_item_properties)
our solution for adding a custom basemap does not work with Python API's coming with ArcGIS Pro 3.1. Does anyone have a solution for ArcGIS Pro 3.1