Maps — one control, any renderer
Maps ships the map contract: the MapControl a layout area returns, and the four records it
composes. It ships no renderer at all, which is the whole point — content describes a map as
geographic data, and the deployment decides which engine paints it.
The model
| Type | What it carries |
|---|---|
MapControl |
the control itself: Options, Markers, Circles |
MapOptions |
Center, Zoom (default 15), MapTypeId (roadmap, satellite, hybrid, terrain) and the UI toggles |
LatLng |
a coordinate — Lat and Lng, both decimal degrees |
MapMarker |
Position, Title, Label, Draggable, Icon, plus Id/Data reported back on click |
MapCircle |
Center, Radius, fill and stroke styling, plus Id/Data |
A minimal map centred on Zürich:
using MeshWeaver.Maps;
new MapControl
{
Options = new MapOptions { Center = new LatLng(47.3769, 8.5417), Zoom = 12 },
Markers = [ new MapMarker { Position = new LatLng(47.3769, 8.5417), Title = "Zürich" } ],
}
🚨 The radius is in METRES, not pixels
MapCircle.Radius is a ground distance in metres and defaults to 1000. It does not scale with
zoom, because it is a fact about the world rather than about the view. A circle that looks right at
zoom 15 and vanishes at zoom 5 is behaving correctly; a radius chosen to "look right" at one zoom is
the mistake. Reach for Zoom to frame it, never for Radius.
🚨 This package ships no renderer
Install Maps alone and you have a control nobody draws — the page renders the area and the map is
simply absent. Pair it with exactly one renderer view pack:
| Renderer | Package | Key |
|---|---|---|
| OpenStreetMap / Leaflet | OpenStreetMap |
none — tiles and Leaflet both travel inside the module |
| Google Maps | GoogleMaps |
GoogleMaps:ApiKey |
| Apple MapKit JS | AppleMaps |
a MapKit token |
Install two and both claim the same control. Install one.
Why the control is provider-neutral
MapControl names no provider anywhere in its surface, so switching map engines is an
installation change and never a content change. The galleries in the three renderer packages
render the same example code through three different engines, which is the property this package
exists to give you.
How it activates
Maps is a module: installing it lands MeshWeaver.Maps.dll, and the deployment lists that DLL
under Modules:Assemblies. Until 2026-09-02 the assembly shipped inside the portal image instead;
it was carved out with the indexing pipeline in Systemorph/MeshWeaver#2941, so on any image from
that point on the module is the only way it reaches a mesh.