Wednesday, December 28, 2016

Get FeatureLayer from GIS Layer Name in ArcGIS Explorer Application

Here is the code snippet to get the "FeatureLayer" from the GIS Layer Name in ArcGIS Explorer Application.


        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

All Blogs so far ...