Here is the code snippet to get the "FeatureLayer" from the GIS Layer Name in ArcGIS Explorer Application.
FeatureLayer ToGoFeatureLayer = null;
foreach (MapItem EachMapItem in ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems)
{
if ((EachMapItem is FeatureLayer) && (EachMapItem.Name == GISLayerName))
{
ToGoFeatureLayer = (FeatureLayer)EachMapItem;
break;
}
}
return ToGoFeatureLayer;
}
public static FeatureLayer
GetFeatureLayer(string GISLayerName)
{FeatureLayer ToGoFeatureLayer = null;
foreach (MapItem EachMapItem in ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems)
{
if ((EachMapItem is FeatureLayer) && (EachMapItem.Name == GISLayerName))
{
ToGoFeatureLayer = (FeatureLayer)EachMapItem;
break;
}
}
return ToGoFeatureLayer;
}
No comments:
Post a Comment