Sneha,
I would like to ask you about your question, for my understandings, you just want to highlight the features for US country or any other query results? If my understanding is right, it is easy to do, please refer the following code:
winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay();
winformsMap1.Overlays.Add(worldMapKitDesktopOverlay);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(@"..\..\SampleData\Data\Countries02.shp");
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green));
InMemoryFeatureLayer highlightLayer = new InMemoryFeatureLayer();
highlightLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
highlightLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(100,GeoColor.StandardColors.DarkGreen)) ;
LayerOverlay worldOverlay = new LayerOverlay();
worldOverlay.Layers.Add("WorldLayer", worldLayer);
winformsMap1.Overlays.Add("WorldOverlay", worldOverlay);
LayerOverlay highlightOverlay = new LayerOverlay();
highlightOverlay.Layers.Add("HighlightLayer", highlightLayer);
winformsMap1.Overlays.Add("HighlightOverlay", highlightOverlay);
worldLayer.Open();
Collection<Feature> features = worldLayer.QueryTools.GetFeaturesByColumnValue("Country_Name", "US");
worldLayer.Close();
highlightLayer.InternalFeatures.Clear();
foreach (Feature feature in features)
{
highlightLayer.InternalFeatures.Add(feature);
}
winformsMap1.CurrentExtent = new RectangleShape(-177.333203125, 92.96484375, 82.823046875, -89.84765625);
winformsMap1.Refresh();
So you can see we just need to use the GetFeaturesByColumnValue method of QueryTools to implement this ability. Also if I misunderstood your requirements please tell me further information about your requirements,
Thanks,
Scott,