Table of Contents

Class S100PickHighlightLayer

Namespace
EncDotNet.S100.Renderers.Mapsui
Assembly
EncDotNet.S100.Renderers.Mapsui.dll

A reusable Mapsui overlay layer that outlines a picked feature's geometry — the drawing complement to PickAsync(GeographicPickQuery, CancellationToken). A host adds Layer to its Map.Layers once, then calls Show(S100Pick?) (or an overload) as picks change to highlight the hit; Clear() removes the highlight.

public sealed class S100PickHighlightLayer
Inheritance
S100PickHighlightLayer
Inherited Members

Remarks

This is step 7's "optional reusable highlight-layer support independent of any view model": it depends only on S100FeatureGeometry (the renderer-neutral geometry surfaced on Geometry) and Mapsui, not on the session, a catalogue, an application palette, a view model, or Avalonia. The Viewer keeps its own richer overlay (which also draws a cursor-echo marker at the click point and dims against dark chart palettes); those are host UX concerns, so this reusable layer draws only the feature outline — the "what", not the "where".

For each geometry it draws, in feature-space (so the outline scales with zoom and stays anchored as the map pans): a faint fill plus accent outline for an area's exterior ring and any holes, an accent stroke for each curve, and an accent ring around each point. Coverage picks carry no geometry, so Show(S100Pick?) clears the layer for them.

Not thread-safe: build and mutate it on the host's UI thread, like any other Mapsui layer. It is cheap to rebuild — a pick yields a handful of features — so every update replaces the layer's contents wholesale.

Constructors

S100PickHighlightLayer(S100PickHighlightStyle?, string?)

Creates the overlay. Add Layer to a Map.Layers collection at the z-order the host wants the highlight to appear.

public S100PickHighlightLayer(S100PickHighlightStyle? style = null, string? name = null)

Parameters

style S100PickHighlightStyle

Appearance; defaults to Default.

name string

Layer name; defaults to DefaultLayerName.

Fields

DefaultLayerName

Default Mapsui.Layers.ILayer.Name for the overlay.

public const string DefaultLayerName = "S-100 Pick Highlight"

Field Value

string

Properties

Layer

The Mapsui layer to add to a Map.Layers collection. Starts empty; its contents are driven by the Show/Clear() methods.

public ILayer Layer { get; }

Property Value

ILayer

Methods

Clear()

Clears the highlight, leaving the layer attached and empty.

public void Clear()

Show(S100FeatureGeometry?)

Highlights a single feature geometry (for a host that resolved it outside a pick). A null or empty geometry clears the highlight.

public void Show(S100FeatureGeometry? geometry)

Parameters

geometry S100FeatureGeometry

Show(S100Pick?)

Highlights the feature a pick refers to. A null pick, or a pick with no geometry (a coverage sample), clears the highlight.

public void Show(S100Pick? pick)

Parameters

pick S100Pick

Show(IEnumerable<S100Pick>)

Highlights every feature in a set of picks — e.g. all hits stacked under the cursor. An empty collection (or one with no drawable geometry) clears the highlight. Coverage picks contribute nothing.

public void Show(IEnumerable<S100Pick> picks)

Parameters

picks IEnumerable<S100Pick>