Skip to main content
Version: 1.0.8

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—
legendobject{"show":true,"position":"bottomleft","title":"","source":"st… (truncated)Map legend: rows by marker State, by marker Group (each group drawn with its own marker look), or Custom only — plus your own items for things that are not markers. 1.0.8
  ↳ legend.showbooleantrue— 1.0.8
  ↳ legend.positionenumbottomleftOptions: topleft · topright · bottomleft · bottomright. 1.0.8
  ↳ legend.titlestring""Heading above the rows (blank = none). 1.0.8
  ↳ legend.sourceenumstateState: Normal / Warning / Alarm / Offline. Group: one row per marker group. Custom: only the items below. Options: state · group · custom. 1.0.8
  ↳ legend.filterbooleantrueClick a row to hide / show its markers. 1.0.8
  ↳ legend.itemsarray[]Your own rows, shown after the automatic ones — e.g. a geofence or pipeline colour. They describe; they don't count or filter. 1.0.8
    ↳ legend.items.labelstring""— 1.0.8
    ↳ legend.items.colorcolor#3b82f6— 1.0.8
    ↳ legend.items.shapeenumsquareOptions: dot · pin · circle · square · diamond · triangle · arrow. 1.0.8
    ↳ legend.items.iconicon""— 1.0.8
alarmPulsebooleantruePulse the ring on alarm markers in LiveView (respects reduced-motion).
showLocationbooleanfalseShow the viewer's own position (asks browser permission). Off by default.
slideobject{"enabled":false,"duration":1000}Move markers smoothly to a new position instead of jumping. Markers far off screen always jump. 1.0.8
  ↳ slide.enabledbooleanfalseSlide instead of snap (LiveView). 1.0.8
  ↳ slide.durationnumber1000Slide time in ms. Match it to how often the position updates for continuous motion. 1.0.8
bounceobject{"onAdd":false,"onAlarm":false,"height":60,"duration":800}Marker bounce: when it first appears, when it goes into Alarm, and each time its bounceTrigger changes. 1.0.8
  ↳ bounce.onAddbooleanfalseMarkers drop in with a bounce the first time they appear. 1.0.8
  ↳ bounce.onAlarmbooleanfalseA marker bounces when its state changes into Alarm. 1.0.8
  ↳ bounce.heightnumber60Drop height in px. 1.0.8
  ↳ bounce.durationnumber800Length of a bounce in ms. 1.0.8
mapToneenumcolorBase-map colouring. Grayscale / Muted keep the map quiet so colour means state (HP-HMI); Dark suits a dark control room. Markers and overlays keep their colour. Options: color · grayscale · muted · dark. 1.0.8
clusterobject{"enabled":false,"radius":60}Group nearby markers into count bubbles for large fleets (a bubble takes the worst state inside it). 1.0.8
  ↳ cluster.enabledbooleanfalse— 1.0.8
  ↳ cluster.radiusnumber60Grid cell size in px. 1.0.8
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.
geoJsonStyleobject{"color":"#2563eb","fillColor":"#3b82f6","fillOpacity":0.15,… (truncated)Default GeoJSON style. A feature's own properties (stroke / fill / stroke-width / fill-opacity) override it. 1.0.8
  ↳ geoJsonStyle.colorcolor#2563ebStroke colour. 1.0.8
  ↳ geoJsonStyle.fillColorcolor#3b82f6Fill colour. 1.0.8
  ↳ geoJsonStyle.fillOpacitynumber0.15— 1.0.8
  ↳ geoJsonStyle.weightnumber2Stroke width in px. 1.0.8
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.
controlobject{"view":"","position":"topright","params":{}}A View shown as a map corner control, with bi-directional params. 1.0.8
  ↳ control.viewview""View shown in the corner (blank = no control). 1.0.8
  ↳ control.positionenumtoprightOptions: topleft · topright · bottomleft · bottomright. 1.0.8
  ↳ control.paramsobject{}Params passed into the control View. 1.0.8
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.groupstring""Category, e.g. Trucks / Pumps — the legend's rows when its source is Group. Bind to a query column. 1.0.8
  ↳ 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.displayenumiconDraw the marker as a shape (with an optional icon), or as an uploaded image. Switching clears the other side's settings. Options: icon · image. 1.0.8
  ↳ markers.shapeenumdotMarker outline. Dot is the lightweight default (scales to large fleets); the others can hold an icon. Every outline shows the quality ring. Options: dot · pin · circle · square · diamond · triangle · arrow. 1.0.8
  ↳ markers.sizenumber24Marker width in px (a dot's diameter). No upper limit. 1.0.8
  ↳ markers.colorcolor""Fill colour; blank = the state shade.
  ↳ markers.iconicon""Icon from the icon library, drawn inside the shape (a dot with an icon is drawn as a circle). 1.0.8
  ↳ markers.iconColorcolor""Icon colour; blank = white. 1.0.8
  ↳ markers.spinbooleanfalseSpin the icon continuously — e.g. a running fan or pump. Bind to a running tag. 1.0.8
  ↳ markers.imageasset""Image from the asset Library or the Uploads folder. 1.0.8
  ↳ markers.rotatenumber0Degrees — bind to a heading tag. Turns the whole marker; a pin keeps its tip on the point and turns its icon. 1.0.8
  ↳ markers.bounceTriggernumber0Bounce the marker once each time this value changes to a new non-zero value (LiveView). Bind it to an event counter, an alarm count, or a button output. 1.0.8
  ↳ markers.followbooleanfalseKeep the map centred on this marker as it moves (LiveView). If several are set, the first one wins. 1.0.8
  ↳ markers.popupViewview""View embedded in a click popup, with bi-directional params.
  ↳ markers.popupParamsobject{}Params passed into the popup View.
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.groupstring—Category, e.g. Trucks / Pumps — the legend's rows when its source is Group. Bind to a query column. 1.0.8
  ↳ 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.displayenum—Draw the marker as a shape (with an optional icon), or as an uploaded image. Switching clears the other side's settings. Options: icon · image. 1.0.8
  ↳ selectedMarker.shapeenum—Marker outline. Dot is the lightweight default (scales to large fleets); the others can hold an icon. Every outline shows the quality ring. Options: dot · pin · circle · square · diamond · triangle · arrow. 1.0.8
  ↳ selectedMarker.sizenumber—Marker width in px (a dot's diameter). No upper limit. 1.0.8
  ↳ selectedMarker.colorcolor—Fill colour; blank = the state shade.
  ↳ selectedMarker.iconicon—Icon from the icon library, drawn inside the shape (a dot with an icon is drawn as a circle). 1.0.8
  ↳ selectedMarker.iconColorcolor—Icon colour; blank = white. 1.0.8
  ↳ selectedMarker.spinboolean—Spin the icon continuously — e.g. a running fan or pump. Bind to a running tag. 1.0.8
  ↳ selectedMarker.imageasset—Image from the asset Library or the Uploads folder. 1.0.8
  ↳ selectedMarker.rotatenumber—Degrees — bind to a heading tag. Turns the whole marker; a pin keeps its tip on the point and turns its icon. 1.0.8
  ↳ selectedMarker.bounceTriggernumber—Bounce the marker once each time this value changes to a new non-zero value (LiveView). Bind it to an event counter, an alarm count, or a button output. 1.0.8
  ↳ selectedMarker.followboolean—Keep the map centred on this marker as it moves (LiveView). If several are set, the first one wins. 1.0.8
  ↳ selectedMarker.popupViewview—View embedded in a click popup, with bi-directional params.
  ↳ selectedMarker.popupParamsobject—Params passed into the popup View.
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.

Map settings were regrouped in 1.0.8, and saved views are not converted

Related settings moved into groups, and the marker look was rebuilt. A Map saved by 1.0.7 opens with these settings back at their defaults — re-enter them under the new names, and re-alias the columns of any query bound to markers:

1.0.71.0.8
showLegendlegend.show
cluster (on/off), clusterRadiuscluster.enabled, cluster.radius
geoJsonColor, geoJsonFillColor, geoJsonFillOpacity, geoJsonWeightgeoJsonStyle.color, .fillColor, .fillOpacity, .weight
controlView, controlPosition, controlParamscontrol.view, .position, .params
marker icon (pin, circle, square…)marker shape; icon is now an icon from the icon library drawn inside the shape
marker iconAssetmarker image, with display set to image
marker radius, iconSizemarker size (width in px; a dot's diameter)
marker iconRotatemarker rotate

A marker's iconColor now colours the icon inside the shape and defaults to white; the shape itself takes color, or the state shade when that is blank. With legend.show defaulting to on, a legend you had hidden comes back until you turn it off again.

Markers Changed in 1.0.8​

Each marker is one field per idea: display (a shape, or an uploaded image), shape — dot, pin, circle, square, diamond, triangle or arrow — size, color, an icon from the icon library with its iconColor, spin for a running fan or pump, and rotate for a heading. Every shape carries the quality ring. dot is the light default and scales to a large fleet; switching display clears the settings of the side it left.

Motion New in 1.0.8​

  • slide — a moving marker glides to its new position over slide.duration ms instead of jumping. Match the duration to how often the position updates and a vehicle moves continuously. A marker far off screen always jumps. Set follow on one marker to keep the map centred on it as it moves.
  • bounce — markers drop in when they first appear (onAdd), bounce when they go into Alarm (onAlarm), and bounce once each time their own bounceTrigger changes to a new non-zero value — bind it to an event counter.

Both run in LiveView only, and both are off for a viewer whose system asks for reduced motion.

Map tone and legend New in 1.0.8​

mapTone recolours the base map only — grayscale or muted keep it quiet so that colour on the map means state, dark suits a dark control room. Markers and overlays keep their colour.

The legend is a corner control of the map (it no longer overlaps the attribution). legend.source lists rows by marker state (Normal, Warning, Alarm, Offline), by marker group — a marker's group field, so trucks and pumps get a row each, drawn in their own marker look — or only your own custom items, which describe things that are not markers, such as a geofence colour. With legend.filter on, clicking a row hides or shows its markers.

Setting the default view​

Double-click the Map on the canvas to enter it, then pan and zoom and apply the view as the default. Changed in 1.0.8 The button that used to do this sat under the selection box.

See also​