Class MapLibreExtension
- Namespace
- Kuestenlogik.Bowire.Semantics.Extensions
- Assembly
- Kuestenlogik.Bowire.Map.dll
Bowire UI extension that mounts the MapLibre GL JS map widget on the
coordinate.wgs84 semantic kind. Lives in the
Kuestenlogik.Bowire.Map NuGet package — the first
concrete consumer of the extension API the ADR pins under "Extension
framework", and the dogfood proof that the same shape third parties use
is the shape Bowire's own widgets use.
[BowireExtension]
public sealed class MapLibreExtension : IBowireUiExtension
- Inheritance
-
MapLibreExtension
- Implements
- Inherited Members
Remarks
The descriptor only carries metadata + resource pointers; all rendering
logic lives in the JS bundle at wwwroot/js/widgets/map.js, which
is shipped as an embedded resource on this assembly and served at
/api/ui/extensions/kuestenlogik.maplibre/map.js. The JS bundle
calls window.BowireExtensions.register({...}) at load time;
this descriptor only exists so the workbench's
/api/ui/extensions enumeration knows the extension is present
and which kinds it claims.
The BundleResourceName, StylesResourceName
and AdditionalAssetNames point at the vendored MapLibre
JS / CSS / LICENSE. The asset-serving endpoint resolves them from this
assembly's manifest-resource stream, never an external CDN — Bowire's
no-network guarantee survives a map mount when no
Bowire:MapTileUrl is configured.
Offline lockdown — when Bowire:MapTileUrl is unset, the widget
configures a no-source style with no glyphs URL and
no sprite URL. Selection / discriminator visuals are
rendered via MapLibre's circle-layer primitive (no text-field,
no symbol-layer icons) so no glyph PBF / sprite atlas request ever
leaves the process. A regex-over-bundle test pins this — any future
style tweak that re-introduces an external URL fails CI before the
no-network guarantee leaks.
Constructors
MapLibreExtension()
public MapLibreExtension()
Properties
AdditionalAssetNames
Extra asset names served under
/api/ui/extensions/{Id}/{name}. The vendored MapLibre GL
JS bundle itself rides here — the workbench fetches it lazily the
first time a map widget is mounted, so the cost of the 800 KB
renderer doesn't fall on every Bowire page load. The
LICENSE file ships next to it to satisfy the BSD-3-Clause
terms.
public IReadOnlyList<string> AdditionalAssetNames { get; }
Property Value
BowireApiRange
Semver range the extension declares compatibility with — e.g.
"1.x" for any v1 of the Bowire API. The workbench compares
this against its own Bowire API version on load; a mismatch shows
the extension in a disabled state with a "needs Bowire {x}.x"
badge instead of mounting it.
public string BowireApiRange { get; }
Property Value
BundleResourceName
Embedded-resource name of the JS bundle that calls
window.BowireExtensions.register({...}). Resolved against
the declaring assembly via
GetManifestResourceStream(string)
(prefixed with the assembly's default namespace by
OpenRead(Assembly, IBowireUiExtension, string)). Served at
/api/ui/extensions/{Id}/{Name}.
public string BundleResourceName { get; }
Property Value
Remarks
Shipped as an embedded resource on the
Kuestenlogik.Bowire.Map assembly. Served to
the workbench at /api/ui/extensions/kuestenlogik.maplibre/map.js
— the workbench's extension loader dynamic-imports it on first
mount of a coordinate.wgs84 annotation.
Capabilities
Capability bitmask — which mounting roles the extension is prepared to fill. Drives the workbench's tab placement (Viewer → response pane, Editor → request pane).
public ExtensionCapabilities Capabilities { get; }
Property Value
Id
Stable extension identifier — typically
{vendor}.{name}. Same string the JS-side
register({ id }) call uses, so the workbench can pair the
server-side descriptor with the JS-side registration record.
public string Id { get; }
Property Value
Kinds
Semantic kinds this extension can mount against (e.g.
["coordinate.wgs84"] for the built-in map widget). One
extension can claim several kinds — a future MIL-symbol package
might claim mil.symbol-code + mil.echelon in the
same registration.
public IReadOnlyList<string> Kinds { get; }
Property Value
StylesResourceName
Optional embedded-resource name of a stylesheet shipped alongside
the bundle. null when the extension renders without any
dedicated CSS (most do).
public string? StylesResourceName { get; }