ThinkGeo.com    |     Documentation    |     Premium Support

Drawing order problems

Thinkgeo.Core version 13 beta 343
Thinjgeo.UI.Android version 13 beta306
image

2 different features one has a pointStyle like this:
PointStyle(PointSymbolType.Circle, 18,GeoBrushes.Yellow, new GeoPen(GeoColors.Red, 4));
The linear style :
LineStyle(new GeoPen(outer, sgd.LineStyleDescriptor.OuterPenWidth), new GeoPen(inner, new LineStyle(new GeoPen(GeoColors.Blue, 8), new GeoPen(GeoColors.Green, 5), new GeoPen(GeoColors.Orange, 2));

The drawing order should place the circle on top of the line – which it does for the outer pen, but the inner and center are being drawn over the point feature.

This is what it looks like in version 10.
image

Hey @Richard6,

I was able to recreate this pretty easily on my side too. Definitely not supposed to do that. I’m looking into what’s going on and I’ll update you when I get more info.

Thanks,
Kyle

Hi @Richard6,

I created a winform sample to reproduce this issue, here’s the code:

        mapView1.MapUnit = GeographyUnit.DecimalDegree;
        InMemoryFeatureLayer layer = new InMemoryFeatureLayer();
        layer.InternalFeatures.Add(new Feature(new LineShape(new Vertex[] { new Vertex(0, 0), new Vertex(0.5, 0.5) })));
        layer.InternalFeatures.Add(new Feature(0, 0));
        layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(new GeoPen(GeoColors.Blue, 8), new GeoPen(GeoColors.Green, 5), new GeoPen(GeoColors.Orange, 2));
        layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(PointSymbolType.Circle, 18, GeoBrushes.Yellow, new GeoPen(GeoColors.Red, 4));

        layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

        var layerOverlay = new LayerOverlay();
        layerOverlay.Layers.Add(layer);
        mapView1.Overlays.Add(layerOverlay);

        mapView1.CurrentExtent = new RectangleShape(-179, 90, 179, -90);
        mapView1.Refresh();

I tried the above in both v10 and v12(see screenshot below, the left one is winform v10, the right one is winform v12.), it has the same issue as you mentioned. I was wondering if my sample is the same as yours, do you have two separate layers? the one is for points, and the other one is for lines? Could you show me your code snippet? Or maybe you could modify my code.

Thanks,
Leo

Leo,

Two different layers are involved in our case. One for the points the other for the lines. I can’t really show you our code as the building of the layers is driven by a database configuration. Currently only our android version is on v12. Our WPF version is still on v10. The code to build the layers, outside of changes necessary for v10 to v12 api differences, is identical. If you place the two features in different layers you will likely see the issue.

hi @Richard6,

I reproduced this issue according to what you said, but it can only be reproduced on Android. I’ve fixed it, could you please upgrade your ThinkGeo.Core to 13.0.0-beta346 and give it a try?

Thanks,
Leo

I updated to ThinkgeoCore 13.0.0-beta346 and Thinkgeo.Android 13.0.0-beta309 – I don’t see any change in behavior – the center and inner pens are still drawing over the point symbol.

hi @Richard6,

The SkiaSharp works differently between desktop and Android. I tried to set DrawingLevel.LevelFour to PointStyle’s DrawingLevel when it’s on Android to fix your issue, but it didn’t work because there’s something with ThinkgeoCore 13.0.0-beta346.

Here’s an easy workaround for you, you could try the code below:

var pointStyle = new PointStyle(PointSymbolType.Circle, new GeoSolidBrush(GeoColors.Yellow), new GeoPen(GeoBrushes.Red, 4), 18);
pointStyle.DrawingLevel = DrawingLevel.LevelFour;

Thanks,
Leo

Thank you – the workaround resolved the issue.

Great, just let me know if you face any issues.

Thanks,
Leo