Live maps on MapLibre: an agent fleet, region health, route tracking and a location finder, each with a side panel kept in sync with the map. Bring your own tile style.
On this page
Examples
Agent fleet
Region status
Route tracking
Location finder
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- points
{ id, lat, lng, label?, description?, status?, pill?, icon? }[]- Default
[] - Markers. Each one is a button: status sets the colour (online and alert pulse), pill shows a label such as a price or an ETA instead of a dot.
- routes
{ id, coords: [lng, lat][], progress?, color? }[]- Default
[] - Lines; the travelled share draws solid, the rest dashed.
- selected / onSelect
string|null / (id) => void- The selection. The camera flies to it (a jump with reduced motion) and the popup opens.
- popup
(point) => ReactNode- Card above the selected point, in your theme.
- mapStyle
URL|style object|{ light, dark }- Default
OpenFreeMap positron / dark - Bring any MapLibre style (MapTiler, Stadia, Protomaps, self-hosted). It follows the page theme.
- padding
{ top?, right?, bottom?, left? }- Default
24 each - Camera padding, e.g. { left: 372 } so points stay clear of a floating panel.
- center / zoom / selectZoom
[lng, lat] / number / number- Default
fit points / 2 / 11 - Start view (default: fit the points) and the zoom used on select (it never zooms out).
- controls
boolean|{ zoom?, compass?, locate? }- Default
true - Zoom, compass (tap to reset north) and locate, as themed buttons.
- legend
ReactNode- Bottom-left, e.g. <MapLegend items={[{ color, label }]} />. Hidden on small screens.
- statusColors
Record<string, string>- Default
online, busy, idle, offline, alert - Colours for your own statuses.
- cooperativeGestures
boolean- Default
true - Two fingers to pan and Ctrl or ⌘ to zoom, so the page still scrolls past the map.
- workerUrl
string- Default
unpkg, same version - MapLibre's worker. Copy node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs into public/ and pass its URL if your CSP blocks CDNs.
- MapPanel
component- title, subtitle, items, selected, onSelect, query, filters, grid, footer. Floats left on desktop; a bottom sheet on phones.
- Install
-- Needs maplibre-gl 6.x (installed with the block). The block imports maplibre-gl/dist/maplibre-gl.css itself.
- Loading
-- MapLibre (about 1 MB) loads only when the map nears the viewport; a quiet placeholder holds the space, and a message shows if WebGL is off.
- Tiles
-- The default OpenFreeMap tiles are free with no key, for demos and small sites. Attribution always shows; for production traffic use your own provider.
| Prop | Type | Default | Description |
|---|---|---|---|
| points | { id, lat, lng, label?, description?, status?, pill?, icon? }[] | [] | Markers. Each one is a button: status sets the colour (online and alert pulse), pill shows a label such as a price or an ETA instead of a dot. |
| routes | { id, coords: [lng, lat][], progress?, color? }[] | [] | Lines; the travelled share draws solid, the rest dashed. |
| selected / onSelect | string | null / (id) => void | - | The selection. The camera flies to it (a jump with reduced motion) and the popup opens. |
| popup | (point) => ReactNode | - | Card above the selected point, in your theme. |
| mapStyle | URL | style object | { light, dark } | OpenFreeMap positron / dark | Bring any MapLibre style (MapTiler, Stadia, Protomaps, self-hosted). It follows the page theme. |
| padding | { top?, right?, bottom?, left? } | 24 each | Camera padding, e.g. { left: 372 } so points stay clear of a floating panel. |
| center / zoom / selectZoom | [lng, lat] / number / number | fit points / 2 / 11 | Start view (default: fit the points) and the zoom used on select (it never zooms out). |
| controls | boolean | { zoom?, compass?, locate? } | true | Zoom, compass (tap to reset north) and locate, as themed buttons. |
| legend | ReactNode | - | Bottom-left, e.g. <MapLegend items={[{ color, label }]} />. Hidden on small screens. |
| statusColors | Record<string, string> | online, busy, idle, offline, alert | Colours for your own statuses. |
| cooperativeGestures | boolean | true | Two fingers to pan and Ctrl or ⌘ to zoom, so the page still scrolls past the map. |
| workerUrl | string | unpkg, same version | MapLibre's worker. Copy node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs into public/ and pass its URL if your CSP blocks CDNs. |
| MapPanel | component | - | title, subtitle, items, selected, onSelect, query, filters, grid, footer. Floats left on desktop; a bottom sheet on phones. |
| Install | - | - | Needs maplibre-gl 6.x (installed with the block). The block imports maplibre-gl/dist/maplibre-gl.css itself. |
| Loading | - | - | MapLibre (about 1 MB) loads only when the map nears the viewport; a quiet placeholder holds the space, and a message shows if WebGL is off. |
| Tiles | - | - | The default OpenFreeMap tiles are free with no key, for demos and small sites. Attribution always shows; for production traffic use your own provider. |
When to use
When to use
- Operational maps people work in: where agents or devices are and what they are doing, region health, a delivery on its way, places to pick from.
- A list and a map that must stay in step: pick in either and the other follows.
When not to use
- A decorative world map or a hero background: no tiles to load: use Dotted Map.
- Comparing numbers across regions: a table reads faster: use Data Table.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Map View to my app and wire it to my own data.
- I need operational maps people work in: where agents or devices are and what they are doing, region health, a delivery on its way, places to pick from. Set that up with the Knowns UI Map View.
- Which Map View props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "map-view" }) and search_docs({ query: "map view" }). Pro props, full examples and source come back once your license key is in the MCP config.