Using the ArcGIS Python API, I've create a WebMap and two Layers (one containing features, the other containing labels):
cbmt <SPAN class="operator token">=</SPAN> WebMap<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
cbmt_geometry_layer <SPAN class="operator token">=</SPAN> Layer<SPAN class="punctuation token">(</SPAN>url <SPAN class="operator token">=</SPAN> <SPAN class="operator token"><</SPAN>url of geometry layer<SPAN class="operator token">></SPAN><SPAN class="punctuation token">)</SPAN>
cbmt_text_layer <SPAN class="operator token">=</SPAN> Layer<SPAN class="punctuation token">(</SPAN>url <SPAN class="operator token">=</SPAN> <SPAN class="operator token"><</SPAN>url of text layer<SPAN class="operator token">></SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I'd like to add both of these layers to the map as basemap layers, like you can in ArcGIS Online or Portal when adding layers to a web map. The WebMap.basemap property is read-only. Is there a property on the WebMap.add_layer() method that specifies to add layers as basemap layers?
xref: How to set the basemap layers of a WebMap using the ArcGIS Python API? - Geographic Information Systems Stack Exchange