Class AvaloniaS100MapExtensions
- Assembly
- EncDotNet.S100.Renderers.Mapsui.Avalonia.dll
Avalonia-specific one-call wiring for the reusable S-100 Mapsui extension.
public static class AvaloniaS100MapExtensions
- Inheritance
-
AvaloniaS100MapExtensions
- Inherited Members
Methods
AddS100(MapControl, S100MapsuiOptions?)
Attaches an S-100 session to the control's map and an AvaloniaMapsuiMapAdapter to the control in a single call, defaulting the session's redraw marshal to the control's dispatcher so the background vector renderers repaint the live control when a settled cached / scene / tile image publishes off-thread.
public static (IS100MapSession Session, AvaloniaMapsuiMapAdapter Adapter) AddS100(this MapControl mapControl, S100MapsuiOptions? options = null)
Parameters
mapControlMapControlThe live control to attach to. Any Mapsui Avalonia map control works; its Mapsui.Map must be set before calling. Pass a CaptureSynchronizedMapControl when the host renders the current view to an image under a live paint and wants that capture serialized against painting; a plain control is otherwise sufficient.
optionsS100MapsuiOptionsRendering configuration for AddS100(Map, S100MapsuiOptions?). Supply a CRS transform factory (or a prebuilt renderer). When its RedrawMarshal is null, a UI-thread marshal is supplied automatically; a host-set marshal is kept.
Returns
- (IS100MapSession Session, AvaloniaMapsuiMapAdapter Adapter)
The owned, disposable session and the attached adapter. The caller disposes both (the adapter borrows the control and map; disposing it does not dispose them).
Exceptions
- ArgumentNullException
mapControlis null.- InvalidOperationException
The call is not on Avalonia's UI thread, or the control has no map.