Extract layers from web map (portal/portal item)

449
2
Jump to solution
05-18-2023 11:13 PM
komalzoting
New Contributor II

Hi all,

I need to extract/get layers, form templates from the web map(portal/portal item), have to show point layers, form templates , identify attributes, sync attributes.  Please suggest the solution. 

0 Kudos
1 Solution

Accepted Solutions
Shubham_Sharma
Esri Contributor

To get layers of a web-map portal item, load the portal item to the map, and get the list of operational layers using:

map.operationalLayers
val portal = Portal("Your-Portal-URL")
val portalItem = PortalItem(portal, "Portal-Item-ID")
map = ArcGISMap(portalItem)
map.addDoneLoadingListener {
    Log.i("TAG","Number of layers: ${map.operationalLayers.size} ")
    val firstLayer = map.operationalLayers[0]
}

 

https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/mapping/GeoMode...

 

View solution in original post

2 Replies
Shubham_Sharma
Esri Contributor

To get layers of a web-map portal item, load the portal item to the map, and get the list of operational layers using:

map.operationalLayers
val portal = Portal("Your-Portal-URL")
val portalItem = PortalItem(portal, "Portal-Item-ID")
map = ArcGISMap(portalItem)
map.addDoneLoadingListener {
    Log.i("TAG","Number of layers: ${map.operationalLayers.size} ")
    val firstLayer = map.operationalLayers[0]
}

 

https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/mapping/GeoMode...

 

komalzoting
New Contributor II

Hi Shubham

This is really helpful for me.

Thank You 

0 Kudos