What it does
A small badge naming the map engine: MapLibre GL, OpenLayers, Leaflet or Cesium, with its version.
WebMapX can use four engines, and they do not all support the same features. Cesium cannot reorder a vector layer against a raster one. View projections other than Web Mercator are OpenLayers only. MapLibre has the globe. When two maps behave differently, this badge makes the engine visible.
It is a diagnostic, not a feature for readers. On a public map it is clutter. On a map you are building, or in a bug report, it is the first thing worth knowing.
Using it
Read it. It changes when the map engine changes, and shows a dash when no map is attached.
In your own map
Add activeAdapter with a position. There is nothing to configure.
Worth including on a page where readers can switch engines, and worth leaving out everywhere else.
Extending it
The badge reads the engine that is actually attached, not only the one named in the config. A saved preference or URL parameter can override the config.
Config type | activeAdapter |
|---|---|
| Element | <webmapx-active-adapter> |
| Placement | standalone |
| Source | src/components/webmapx-active-adapter.ts |
| Tests | tests/tool-registration.test.ts |
| Related | zoomLevel, spinner |