InMemoryFeatureLayer inm = new InMemoryFeatureLayer(); public LoadAShapeFileFeatureLayer() { InitializeComponent(); } private void WpfMap_Loaded(object sender, RoutedEventArgs e) { wpfMap1.MapUnit = GeographyUnit.DecimalDegree; wpfMap1.CurrentExtent = new RectangleShape(-180, 90, 180, -90); ShapeFileFeatureLayer layer = new ShapeFileFeatureLayer("../../sampledata/data/usstates.shp"); layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; inm.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Antarctica1; inm.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; LayerOverlay inmOverlay = new LayerOverlay(); inmOverlay.Layers.Add(inm); LayerOverlay overlay = new LayerOverlay(); overlay.Layers.Add(layer); //add your layers here //overlay.Layers.Add(layer1); //overlay.Layers.Add(layer2); //overlay.Layers.Add(layer3); //overlay.Layers.Add(layer4); //overlay.Layers.Add(layer5); wpfMap1.MapClick += new System.EventHandler(wpfMap1_MapClick); wpfMap1.Overlays.Add("overlay",overlay); wpfMap1.Overlays.Add("inmOverlay", inmOverlay); wpfMap1.Refresh(); } void wpfMap1_MapClick(object sender, MapClickWpfMapEventArgs e) { inm.Open(); inm.Clear(); foreach (FeatureLayer item in ((LayerOverlay)wpfMap1.Overlays["overlay"]).Layers) { item.Open(); Collection features = item.QueryTools.GetFeaturesContaining(e.WorldLocation, ReturningColumnsType.AllColumns); foreach (var feature in features) { inm.InternalFeatures.Add(feature); } } wpfMap1.Refresh(wpfMap1.Overlays["inmOverlay"]); }