Skip to main content
Version: 1.0.4

Map

A geographic map with live, tag-bindable markers. Tiles are served through the same-origin backend proxy, so the browser never talks to a tile provider directly.

The Map component as it renders with its default settings.The Map component as it renders with its default settings.

Reach for it when you need:

  • Distributed assets — pump stations, tanks, vehicles
  • A site-wide overview by location

Component name: OpenStreetMap · Category: Display

In the palette: An OpenStreetMap geographic map with live, tag-bindable markers. Tiles are served through the same-origin backend proxy.

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
latnumber20Map center latitude. Bind to a tag to follow an asset.
lngnumber0Map center longitude.
zoomnumber2Initial zoom level.
minZoomnumber0
maxZoomnumber19
tileUrlstring/api/map/tiles/{z}/{x}/{y}Tile URL template ({z}/{x}/{y}). Defaults to the same-origin proxy — do not point at a third-party tile server directly.
attributionstring&copy; <a href="https://www.openstreetmap.org/copyright">Ope… (truncated)Map attribution (legally required for OSM).
baseLayersarray[]Switchable base layers. Empty = use the single tileUrl.
wmsLayersarray[]WMS overlays (GIS raster). Reference a WMS server registered in System settings → Map.
interactivebooleantrueAllow pan/zoom in LiveView (always off in the editor).
showZoomControlbooleantrue
showLegendbooleantrueShow the state legend / per-state filter.
alarmPulsebooleantruePulse the ring on alarm markers in LiveView (respects reduced-motion).
showLocationbooleanfalseShow the viewer's own position (asks browser permission). Off by default.
clusterbooleanfalseGroup nearby markers into count bubbles for large fleets (cluster inherits the worst child state).
clusterRadiusnumber60Cluster grid cell size in px.
geoJsonobject{"type":"FeatureCollection","features":[]}GeoJSON overlay — one FeatureCollection object ({ type, features:[…] }). Per-feature colour goes in each feature's properties (simplestyle: stroke / fill / stroke-width / stroke-opacity / fill-opacity). Bind to a Named Query for live data.
geoJsonColorcolor#2563ebDefault stroke colour (per-feature properties.stroke overrides).
geoJsonFillColorcolor#3b82f6Default fill colour (per-feature properties.fill overrides).
geoJsonFillOpacitynumber0.15Default fill opacity (per-feature properties['fill-opacity'] overrides).
geoJsonWeightnumber2Default stroke width in px (per-feature properties['stroke-width'] overrides).
maxBoundsarray[]Restrict panning to [[south,west],[north,east]]. Empty = unrestricted.
controlViewview""View shown as a map corner control (bi-directional params).
controlPositionenumtoprightOptions: topleft · topright · bottomleft · bottomright.
controlParamsobject{}Params passed into the control View.
viewCommandobject{}Imperative view command (fit/fly/pan/zoom). Bind to trigger it.
shapesarray[]Vector shapes drawn on the map (circle / rectangle / polygon / polyline).
markersarray[{"label":"London","lat":51.5074,"lng":-0.1278,"state":"norm… (truncated)Points on the map. Edit inline, or bind the whole array to a Named Query / FETCH / tag returning rows { lat, lng, label, state, quality, alarmCount }. The samples show until you bind it.
selectedMarkerobject{}Output: the marker last clicked in LiveView ({ id, lat, lng, label, state, quality, ... }).
popupOutputobject{}Output: out/both params echoed back from the open popup's View — bind {{ <Map>.popupOutput.<key> }}.
mapViewobject{}Output: current map view { lat, lng, zoom } — updates on pan/zoom.
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
markerClickMarker clickMapThe clicked marker, under selectedMarker.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Point it at a self-hosted tile server or WMS endpoint in Settings → Map to work on a network with no internet access.

See also