Create portal webmap with group layers

101
0
07-07-2021 08:04 AM
RichardReinicke
Occasional Contributor

Hello,

from inside a more complex jupyter notebook, I'm creating a webmap, add layers (portal items) to it and save the webmap as a new portal item.
map = self.gis.map(location=center, zoomlevel=14)
map.add_layer(item_obj, {'title': "_".join(item_obj.snippet.split("_")[1:]).replace("_II_", "_\\\\_").replace("_", " "), 'visibility':False})
map.save(item_properties, folder=folder)

The new map viewer beta offers the very important new feature for group layers.

Is it possible to organize layers in group layers? The problem is also mentioned but not really answered here:
https://community.esri.com/t5/arcgis-api-for-python-questions/mapview-add-layer-function-options/td-...

What are the possible keys for the optional "options" dict of the add_layers method of MapView widget?
https://developers.arcgis.com/python/api-reference/arcgis.widgets.html#arcgis.widgets.MapView.add_la...

But I can't find a documentation about the add_layer optional "options" dict and if there's a way to create a group layer. I'm using arcgis Python API 1.8.5.


Thank you very much for your help
 

0 Kudos
0 Replies