private void WpfMap_Loaded(object sender, RoutedEventArgs e) { Map1.MapUnit = GeographyUnit.DecimalDegree; Map1.CurrentExtent = new RectangleShape(-155.733, 95.60, 104.42, -81.9); InMemoryFeatureLayer wellsOnBottom = new InMemoryFeatureLayer(); wellsOnBottom.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1; wellsOnBottom.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; wellsOnBottom.InternalFeatures.Add(new Feature(0, 0)); wellsOnBottom.InternalFeatures.Add(new Feature(18, 3)); InMemoryFeatureLayer wellsOnTop = new InMemoryFeatureLayer(); wellsOnTop.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new MyPointStyle(new GeoFont("Arial", 12), 177, new GeoSolidBrush(GeoColor.StandardColors.Black)) { wellsBottom=wellsOnBottom}; wellsOnTop.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; wellsOnTop.InternalFeatures.Add(new Feature(0, 0)); wellsOnTop.InternalFeatures.Add(new Feature(20, 5)); LayerOverlay ov = new LayerOverlay(new Collection() { wellsOnBottom, wellsOnTop }); Map1.Overlays.Add(ov); Map1.Refresh(); } class MyPointStyle : PointStyle { public MyPointStyle(GeoFont characterFont, int characterIndex, GeoSolidBrush characterSolidBrush) : base(characterFont, characterIndex, characterSolidBrush) { } public InMemoryFeatureLayer wellsBottom; protected override void DrawCore(System.Collections.Generic.IEnumerable features, GeoCanvas canvas, System.Collections.ObjectModel.Collection labelsInThisLayer, System.Collections.ObjectModel.Collection labelsInAllLayers) { Collection featuresToDraw = new Collection(); foreach (Feature feature in features) { if (wellsBottom.FeatureSource.GetFeaturesInsideBoundingBox(feature.GetShape().Buffer(0.1, GeographyUnit.DecimalDegree, DistanceUnit.Kilometer).GetBoundingBox(), ReturningColumnsType.NoColumns).Count==0) { featuresToDraw.Add(feature); } } base.DrawCore(featuresToDraw, canvas, labelsInThisLayer, labelsInAllLayers); } }