ThinkGeo.com    |     Documentation    |     Premium Support

Can we find Feature TextStyle Overlap in runtime/refresh

Hi,
I have a scenario, Is it possible to find Feature TextStyle Overlapped or Not.
Example:

Code:
TextStyle tAircraft = TextStyles.CreateMaskTextStyle(“FlightNo”, new GeoFont(“Arial”, 8, DrawingFontStyles.Bold), new GeoSolidBrush(GeoColor.SimpleColors.White), new AreaStyle(new GeoPen(GeoColor.StandardColors.Transparent), new GeoSolidBrush(GeoColor.FromArgb(255, 40, 49, 151))), 15, 0);
tAircraft.OverlappingRule = LabelOverlappingRule.AllowOverlapping;

So, I want to know that display features overlapped or not. is it possible to find it.

Please suggest me anyone for solving it.

Thanks,
Riyaz

Hi Riyaz,

That’s strange because the AllowOverlapping default render all labels, please see my test result:

 ShapeFileFeatureLayer shapeFileLayer = new ShapeFileFeatureLayer(@"..\..\AppData\states.shp");
        shapeFileLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = WorldStreetsAreaStyles.Military();
        shapeFileLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Military1("STATE_NAME");

        shapeFileLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;

        shapeFileLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

Zoom to full extent:

Keep zoom out:

So I think maybe that’s caused by some other reason, could you please create a simple sample based on your code, so we can reproduce that first.

And you can also try the other property of DefaultTextStyle to see whether that’s helpful.

Regards,

Don

Hi Don,
Thanks for your reply.

Actually By seeing we can identify that, features are overlapping or not. But I need to store a TRUE or FALSE value, based on features Overlapping or not. Is there any way to find it.

Thanks,
Riyaz

Hi Riyaz,

It looks we don’t have a sign for overlapped label.

Regards,

Don