How do you read layer metadata in ArcGIS Runtime?

337
2
10-06-2023 09:59 AM
Labels (2)
JBuchanan
New Contributor II

I created some layers in ArcPro and set their metadata within Pro. This metadata is persisted between projects and machines, so I know it is correctly saved to the layer. However, when I load these layers into my runtime app there is no metadata. There is an ArcGISFeatureLayerInfo on the feature table that holds fields similar to the metadata in Pro, such as description and attribution, but this description is empty despite having a description set in Pro. Am I looking in the wrong place? Or is there no way to pull metadata from ArcPro into Runtime?

0 Kudos
2 Replies
PreetiMaske
Esri Contributor

Is the data published as MMPK? It sounds more like a publishing issue from ArcGIS Pro. ArcGIS featureLayerInfo reads the metadata available in datasource at the time of authoring/publishing. I quickly tried creating a mobile map package from ArcGIS Pro and observed that metadata from the datasource is not available in the serviceItem. This info is discoverable from mmap file inside he MMPK.

 

0 Kudos
JBuchanan
New Contributor II

The layers on my map get their data from a Geodatabase(.GDB). The metadata is set on the datasource within the GDB through ArcPro's right-click-> edit metadata window. I then package the layers as a MMPK. I noticed that the metadata that I set on the datasource is in the .geodatabase files stored within the mmpk, but it does not seem to be translated to the LayerInfo as you mentioned. I am just looking for a way to set that LayerInfo so that I don't have to read the .geodatabase.

0 Kudos