Skip to main content
Version: 1.0.7

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.
  ↳ baseLayers.namestring""—
  ↳ baseLayers.urlstring""Tile template ({z}/{x}/{y}); use the /api/map/tiles/<layer>/… proxy.
  ↳ baseLayers.attributionstring""—
wmsLayersarray[]WMS overlays (GIS raster). Reference a WMS server registered in System settings → Map.
  ↳ wmsLayers.namestring""Label shown in the layer control.
  ↳ wmsLayers.serverstring""Registered WMS server name (System settings → Map). The proxy URL is built from it.
  ↳ wmsLayers.layersstring""WMS LAYERS param (comma-separated layer names on that server).
  ↳ wmsLayers.formatstringimage/png—
  ↳ wmsLayers.transparentbooleantrue—
  ↳ wmsLayers.opacitynumber1—
  ↳ wmsLayers.versionstring1.1.1—
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.
  ↳ geoJson.typestringFeatureCollectionAlways "FeatureCollection" for a feature list.
  ↳ geoJson.featuresarray[]The features drawn on the map. + adds a Feature skeleton.
    ↳ geoJson.features.typestringFeature—
    ↳ geoJson.features.geometryobject{"type":"Point","coordinates":[0,0]}Point → coordinates [lng,lat]; LineString → [[lng,lat],…]; Polygon → [[[lng,lat],…]].
      ↳ geoJson.features.geometry.typeenumPointOptions: Point · LineString · Polygon · MultiPolygon.
      ↳ geoJson.features.geometry.coordinatesarray[0,0]Point: [lng, lat]. LineString/Polygon: nested arrays — bind these from a Named Query rather than typing them.
    ↳ geoJson.features.propertiesobject{}Feature metadata + simplestyle: name (tooltip), stroke, fill, stroke-width, stroke-opacity, fill-opacity.
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]] — type the four numbers. Leave it empty for unrestricted panning; a half-filled bounds counts as empty.
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 it to a button output, tag or expression — it runs once per change.
  ↳ viewCommand.openum""What the map should do when this command changes. Options: `` · fitMarkers · fitBounds · flyTo · panTo · zoomTo.
  ↳ viewCommand.latnumber0Target latitude (-90…90).
  ↳ viewCommand.lngnumber0Target longitude (-180…180).
  ↳ viewCommand.zoomnumber12Zoom level. Required for Zoom to level; optional for fly/pan (blank keeps the current zoom).
  ↳ viewCommand.paddingnumber40Px of breathing room around the fitted area.
  ↳ viewCommand.boundsarray[]The area to fit, [[south,west],[north,east]] — all four numbers are required; anything less is ignored.
shapesarray[]Vector shapes drawn on the map (circle / rectangle / polygon / polyline).
  ↳ shapes.typeenumcircleOptions: circle · rectangle · polygon · polyline.
  ↳ shapes.pointsarray[]circle: [centre]; rectangle: [corner1, corner2]; polygon/polyline: vertices.
    ↳ shapes.points.latnumber0—
    ↳ shapes.points.lngnumber0—
  ↳ shapes.radiusMnumber500Circle radius in metres.
  ↳ shapes.strokecolor#2563eb—
  ↳ shapes.weightnumber2—
  ↳ shapes.strokeOpacitynumber0.9—
  ↳ shapes.dashArraystring""—
  ↳ shapes.fillcolor#3b82f6—
  ↳ shapes.fillOpacitynumber0.15—
  ↳ shapes.labelstring""Tooltip text.
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.
  ↳ markers.labelstring""Tooltip text (shown on hover). Escaped before render.
  ↳ markers.latnumber0Latitude (-90…90). Bind to a tag for a moving asset.
  ↳ markers.lngnumber0Longitude (-180…180).
  ↳ markers.stateenumnormalEquipment state — drives marker fill shade (HP HMI). Options: normal · warning · alarm · offline.
  ↳ markers.qualityenumgoodData quality — drives the marker ring. Bind to {{tag.<path>.quality}}. Options: good · bad · uncertain · stale.
  ↳ markers.alarmCountnumber0Active alarms at this asset — shows a count badge when state is Alarm. Bind to a tag.
  ↳ markers.enabledbooleantrueSet false to hide this marker.
  ↳ markers.opacitynumber1Marker opacity (0…1).
  ↳ markers.iconenum""Marker glyph — blank renders a plain dot. Options: `` · pin · navigation · circle · triangle · square · diamond.
  ↳ markers.iconAssetasset""Image icon from the asset Library or the Uploads folder — wins over the glyph.
  ↳ markers.iconColorcolor""Glyph colour (blank = state shade).
  ↳ markers.iconSizenumber28—
  ↳ markers.iconRotatenumber0Rotate the icon (deg) — bind to a heading tag for direction.
  ↳ markers.popupViewview""View embedded in a click popup, with bi-directional params.
  ↳ markers.popupParamsobject{}Params passed into the popup View.
  ↳ markers.colorcolor""Optional fill override; blank = use the state shade.
  ↳ markers.radiusnumber7Marker radius in px (2…40).
selectedMarkerobject{}Output: the marker last clicked in LiveView — bind e.g. {{ <Map>.selectedMarker.label }}.
  ↳ selectedMarker.idstring—The marker's row index within markers, as a string.
  ↳ selectedMarker.labelstring—Tooltip text (shown on hover). Escaped before render.
  ↳ selectedMarker.latnumber—Latitude (-90…90). Bind to a tag for a moving asset.
  ↳ selectedMarker.lngnumber—Longitude (-180…180).
  ↳ selectedMarker.stateenum—Equipment state — drives marker fill shade (HP HMI). Options: normal · warning · alarm · offline.
  ↳ selectedMarker.qualityenum—Data quality — drives the marker ring. Bind to {{tag.<path>.quality}}. Options: good · bad · uncertain · stale.
  ↳ selectedMarker.alarmCountnumber—Active alarms at this asset — shows a count badge when state is Alarm. Bind to a tag.
  ↳ selectedMarker.opacitynumber—Marker opacity (0…1).
  ↳ selectedMarker.iconenum—Marker glyph — blank renders a plain dot. Options: `` · pin · navigation · circle · triangle · square · diamond.
  ↳ selectedMarker.iconAssetasset—Image icon from the asset Library or the Uploads folder — wins over the glyph.
  ↳ selectedMarker.iconColorcolor—Glyph colour (blank = state shade).
  ↳ selectedMarker.iconSizenumber——
  ↳ selectedMarker.iconRotatenumber—Rotate the icon (deg) — bind to a heading tag for direction.
  ↳ selectedMarker.popupViewview—View embedded in a click popup, with bi-directional params.
  ↳ selectedMarker.popupParamsobject—Params passed into the popup View.
  ↳ selectedMarker.colorcolor—Optional fill override; blank = use the state shade.
  ↳ selectedMarker.radiusnumber—Marker radius in px (2…40).
popupOutputobject{}Output: out/both params echoed back from the open popup's View — bind {{ <Map>.popupOutput.<key> }}. The keys are whatever that View declares, so they appear once a popup has run.
mapViewobject{}Output: current map view — updates on pan/zoom. Bind e.g. {{ <Map>.mapView.zoom }}.
  ↳ mapView.latnumber—Centre latitude of the current view.
  ↳ mapView.lngnumber—Centre longitude of the current view.
  ↳ mapView.zoomnumber—Current zoom level.
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​