map_item["operationalLayers"]
Hi,
I have a very general question this time.
The Esri arcgis API is meant to be THE tool to automate workflows and to interact with ArcGIS Portal. But there seem to be a lot of features that are not implemented yet, in my case map authorization.
I have the new webmaps (next gen) and map viewer beta. I can interact with web maps v2 also from the Python API. But I can't create a group layer with API methods.
I can do:
map_item.get_data()
I see my GroupLayer in the map layers:
map_item["operationalLayers"]
[
{
"id": "htsews6tyu0-layer-10010",
"title": "DummyGroup",
"layers": [
{
"id": "17cc733308b-layer-3",
"title": "FeatureLayer1",
"url": "some-feature-server-url",
"itemId": "d77d046fb6de424da2258a08b376f1fc",
"layerType": "ArcGISFeatureLayer",
"popupInfo": {
"popupElements": [
{
"type": "fields"
}
],
"showAttachments": True,
"fieldInfos": [
{
"fieldName": "objectid",
"label": "OBJECTID",
"visible": False
}
],
"title": "Titel1"
}
},
{
"id": "17cc7332022-layer-2",
"title": "FeatureLayer2",
"url": "some-feature-server-url",
"itemId": "3efe6ee7327e49e59a37406f622db492",
"layerType": "ArcGISFeatureLayer",
"popupInfo": {
"popupElements": [
{
"type": "fields"
}
],
"showAttachments": True,
"fieldInfos": [
{
"fieldName": "objectid",
"label": "OBJECTID",
"visible": False
}
],
"title": "Titel2"
}
}
],
"layerType": "GroupLayer"
}
]
Now I can get portal Feature Service items and it's FeatureLayer items and I want to:
1. add another Feature Layer to map_item["operationalLayers"][0]["layers"]
2. or add another group layer with x feature layers
We really need operations for the Python API to compose a webmap and its layers from existing layer items.