Hello,
I have a shape-file of type “Point”. After I add it to my map everything seems perfect. But as soon as I want to change the dot from my points to triangels it only Displays the triangle behind the dot. Here is some code I set for the point style:
Layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.PointType = PointType.Symbol;
Layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolType = PointSymbolType.Triangle;
Layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolSize = 20;
I attach a screenshot of my points with activated triangle style.
My goal is to replace the black dots with the triangles or removing the black dots.
I hope someone can help me.
Triangle.PNG (6.67 KB)
Removing the inner dot in a point shape-file
Hi Daniel,
As below is a sample for shows how to generate the triangle. Wish it’s helpful.
private void WpfMap_Loaded(object sender, RoutedEventArgs e)
{
Map1.MapUnit = GeographyUnit.DecimalDegree;
InMemoryFeatureLayer Layer = new InMemoryFeatureLayer();
Layer.InternalFeatures.Add(new Feature(0, 0));
Layer.InternalFeatures.Add(new Feature(10, 0));
Layer.InternalFeatures.Add(new Feature(0, 10));
Layer.InternalFeatures.Add(new Feature(10, 10));
Layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleTriangleStyle(GeoColor.StandardColors.Transparent, 10, GeoColor.StandardColors.Black, 1);
Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.CurrentExtent = new RectangleShape(-20, 20, 20, -20);
LayerOverlay overlay = new LayerOverlay();
overlay.Layers.Add(Layer);
Map1.Overlays.Add(overlay);
Map1.Refresh();
}
Regards,
Don
Thank you very much for the code.
I tested it and it worked perfektly. The black dot in the Center has dissappeard.
I set the DefaultPointStyle once in the beginning to a SimpleTriangleStyle with GeoColor.StandardColors.Black and fixed size of 20 exactly how you described in your code .
After that I set the DefaultPointStyle.SymbolType to my desired Style like Cross or Diamond 2 and override the DefaultPointStyle.SymbolSolidBrush.Color with my Color and the DefaultPointStyle.SymbolSize with my own Size and the middle black dot does not appear.
Thank your very much again for your help. :)
Regards,
Daniel
Hi Daniel,
I am glad to hear the code is helpful for you.
Any question please let us know.
Regards,
Don