Hello,
I’m experiencing a very strange issue with FilterStyles
and FilterConditions
. I’ve created an MP4 video to demonstrate it, as it’s quite difficult to explain in words.
In short: when displaying an overlay using filters, it sometimes randomly shows features that do not match the filter conditions , but only at the currently active zoom level . It’s not always a specific zoom level that’s affected. When I change the zoom level, the map renders correctly again. Occasionally, zooming in and out causes the previously corrupted zoom level to suddenly display correctly.
Here’s how I define multiple filter conditions:
Dim AangebrachtGietMortel As New FilterStyle()
AangebrachtGietMortel.Conditions.Add(New FilterCondition("gietmortel", "ja"))
HatchStyle = New GeoHatchBrush(GeoHatchStyle.ForwardDiagonal,GeoColor.FromArgb(250, GeoColors.DarkBlue), GeoColor.FromArgb(0, GeoColors.BrightOrange))
Areastyle = New AreaStyle(New GeoPen(GeoColors.Black, 1), HatchStyle)
AangebrachtGietMortel.Styles.Add(Areastyle)
AangebrachtGietMortel.Styles.Add(New TextStyle("Tekstlabel", New GeoFont("Segoe UI", 3.5, DrawingFontStyles.Regular), GeoBrushes.DarkBlue))
listOfStyles.Add(AangebrachtGietMortel)
And then set the zoomlevels like this:
lay.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(SimpelStyle)
lay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level14
For Each stijl As FilterStyle In FilterStyles
lay.ZoomLevelSet.ZoomLevel15.CustomStyles.Add(stijl)
Next
' Zoomlevel 15 t/m 20
lay.ZoomLevelSet.ZoomLevel15.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
In the video, the one remaining feature is actually correct — it’s the others that appear unexpectedly.
Am I missing something?
Best regards,
Guido van den Boom