It seems some of my labels are not rendering correctly with the new WPF Desktop Edition.
Here are two screen shots.
Is this something to do with the rendering of Tiles?
It seems some of my labels are not rendering correctly with the new WPF Desktop Edition.
Here are two screen shots.
Is this something to do with the rendering of Tiles?
Hi Craig,
We tried using world map kit and some local shapefiles to reproduce the chopped text problem, but did not succeed.
Would you please provide more details about how to reproduce this issue? Like what kind of overlays, layers are you using? And what’s the version of your .NET Framework and your operating system?
Looking forward to your feedback.
Regards,
Tsui
Tsui,
Here is some code that reproduces the labelling issue. You will need to zoom into level 16 or lower.
wpfMap1.MapUnit = ThinkGeo.MapSuite.Core.GeographyUnit.DecimalDegree;
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(new BackgroundLayer(new GeoSolidBrush(GeoColor.GeographicColors.Sand)));
ShapeFileFeatureLayer austinStreets = new ShapeFileFeatureLayer(@"C:\Program Files\ThinkGeo\Map Suite Wpf Desktop Evaluation Edition 4.5\Samples\CSharp Samples\SampleData\Data\Austinstreets.shp");
layerOverlay.Layers.Add(austinStreets);
GeoColor baseColor = GeoColor.StandardColors.White;
GeoColor outline = GeoColor.StandardColors.DarkGray;
LineStyle style1 = LineStyles.CreateSimpleLineStyle(outline, 1, false);
LineStyle style2 = LineStyles.CreateSimpleLineStyle(baseColor, 3, outline, 5, true);
LineStyle style3 = LineStyles.CreateSimpleLineStyle(baseColor, 8, outline, 10, true);
LineStyle style4 = LineStyles.CreateSimpleLineStyle(baseColor, 10, outline, 12, true);
austinStreets.ZoomLevelSet.ZoomLevel16.DefaultLineStyle = style1;
austinStreets.ZoomLevelSet.ZoomLevel16.DefaultTextStyle = TextStyles.LocalRoad3("NAME");
austinStreets.ZoomLevelSet.ZoomLevel16.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level17;
austinStreets.ZoomLevelSet.ZoomLevel18.DefaultLineStyle = style2;
austinStreets.ZoomLevelSet.ZoomLevel18.DefaultTextStyle = TextStyles.LocalRoad3("NAME");
austinStreets.ZoomLevelSet.ZoomLevel18.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level18;
austinStreets.ZoomLevelSet.ZoomLevel19.DefaultLineStyle = style3;
austinStreets.ZoomLevelSet.ZoomLevel19.DefaultTextStyle = TextStyles.LocalRoad3("NAME");
austinStreets.ZoomLevelSet.ZoomLevel19.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level19;
austinStreets.ZoomLevelSet.ZoomLevel20.DefaultLineStyle = style4;
austinStreets.ZoomLevelSet.ZoomLevel20.DefaultTextStyle = TextStyles.LocalRoad3("NAME");
austinStreets.ZoomLevelSet.ZoomLevel20.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
wpfMap1.Overlays.Add(layerOverlay);
austinStreets.Open();
wpfMap1.CurrentExtent = austinStreets.FeatureSource.GetBoundingBox();
austinStreets.Close();
wpfMap1.Refresh();
And here are some screens shots.
Hi Craig,
Thanks for the sample code, we’ve reproduced the issue.
There are two ways to avoid the text from being cut off:
1. Set the TileType property of LayerOverlay to SingleTile.
2. Set the DrawingMarginPercentage property of ShapeFileFeatureLayer to a proper value. We’ve tried the value 100; it worked fine for the data of Austin streets.
Hope this will help.
Regards,
Tsui