If you are using FeatureLayer, after the layer has successfully initialized, you can check FeatureLayer.LayerInfo property. If you are using ArcGISDynamicMapServiceLayer, you can use GetAllDetails or GetDetails().
Code:
var layer = new FeatureLayer() { Url = "http://servicesbeta2.esri.com/arcgis/rest/services/SF311/FeatureServer/0" };
layer.Initialized += (a, b) =>
{
if (layer.InitializationFailure == null)
{
var info = layer.LayerInfo;
}
};
layer.Initialize();
Code:
var layer = new ArcGISDynamicMapServiceLayer() { Url = "http://servicesbeta2.esri.com/arcgis/rest/services/SF311/MapServer" };
layer.GetDetails(0, (a, b) =>
{
if (b == null)
{
var info = a as FeatureLayerInfo;
}
});
Bookmarks