Environment
- ThinkGeo.Core / ThinkGeo.UI.Wpf / ThinkGeo.Gpu 15.0.0-beta202
- .NET 8 WPF, Windows
- Styles translated with
FeatureLayerTranslator.Translate(layer, source, source.TileMatrixSet.GetScales()), added withnew MapStyle().AddFeatureLayer(translation)and shown throughGpuBasemap - Native EPSG:25832 grid (
FeatureSourceVectorTileSourcewith bounds(0, 10000000, 1000000, 0),GeographyUnit.Meter)
Problem In GPU mode, polygon borders (and line features) show a thin dark/black line running along the middle of the stroke. With the same layers and styles, classic LayerOverlay rendering looks correct: a solid, evenly coloured border.
The translation reports no warnings. The styles are plain solid pens and solid brushes, with no dashes, hatches, gradients or offsets.
Minimal setup
using System.Collections.Generic;
using ThinkGeo.Core;
var layer = new InMemoryFeatureLayer();
layer.InternalFeatures.Add(new Feature(
"POLYGON((640000 5350000,640100 5350000,640100 5350100," +
"640000 5350100,640000 5350000))"));
layer.InternalFeatures.Add(new Feature(
"LINESTRING(640000 5349980,640100 5349980)"));
var zoom = layer.ZoomLevelSet.ZoomLevel01;
zoom.DefaultAreaStyle = new AreaStyle(
new GeoPen(GeoColors.Blue, 6), new GeoSolidBrush(GeoColor.FromArgb(120, GeoColors.LightBlue)));
zoom.DefaultLineStyle = new LineStyle(
new GeoPen(GeoColors.Blue, 6), new GeoPen(GeoColors.Yellow, 3));
zoom.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
var source = new FeatureSourceVectorTileSource(
new RectangleShape(0, 10000000, 1000000, 0), GeographyUnit.Meter)
{
SourceId = "outline-probe",
MaxConcurrentEncodes = 1
};
source.MaxDataZoom = source.TileMatrixSet.TileMatrices.Count - 1;
source.FeatureSources.Add("features", layer.FeatureSource);
var translation = FeatureLayerTranslator.Translate(
layer, source, source.TileMatrixSet.GetScales());
var style = new MapStyle().AddFeatureLayer(translation);
style.SetBackground(GeoColors.White);
// map.MapUnit = GeographyUnit.Meter;
// map.Basemap = new GpuBasemap(style);
// view extent (639950, 5350150, 640150, 5349950)
For comparison, draw the same layer in a LayerOverlay at that extent.
Expected: a solid 6 px blue border around the polygon, and a blue line with a yellow core, the same as classic. Actual (GPU): a thin dark line along the centre of the stroke.
What we checked on our side
- The translator output is as expected: a fill layer plus a separate outline line layer for the polygon, and outer/inner line layers for the line style. Transparent pens are skipped and colours keep their alpha.
- Our application doesn’t add any extra pens. The polygon uses a single outline pen.