Skip to content

Dynamic map card

The Dynamic map card turns entity latitude and longitude fields into clustered map markers.

When to use it

Use it when coordinates come from devices, interfaces, clients, or groups in the active dashboard search. Use Static map when the complete GeoJSON and marker payload is stored in the dashboard configuration.

Live example

The Card Lab supplies deterministic client coordinates to the production map. External map tiles remain blocked, so the demo exercises markers and card behavior without a third-party request.

Requirements

Requirement Value
Dashboard types Standard
Minimum size 2 columns by 2 rows
Data Entity rows containing resolvable latitude and longitude values
Backend capabilities Entity search plus browser access to OpenStreetMap tiles
Permissions Entity read access; browser geolocation permission when enabled

Configuration

The paths below are relative to cardConfig.data.

entityType

Property Value
Type string
Required Yes
Default No default
Values device, interface, client, or group

Selects the source collection and marker icon family.

localCardFilter

Property Value
Type JMESPath expression
Required No
Default No filter
Values An expression returning an array

Filters only this card before markers are created.

latJmesExpression

Property Value
Type JMESPath expression
Required Yes
Default No default
Values Per-entity expression returning latitude

Reads each marker’s latitude.

lngJmesExpression

Property Value
Type JMESPath expression
Required Yes
Default No default
Values Per-entity expression returning longitude

Reads each marker’s longitude. Markers with a null latitude or longitude are removed.

markerMarkdownText

Property Value
Type Markdown string with interpolation
Required No
Default Empty marker detail
Values Markdown with {{ expression }} evaluated against the clicked entity

Sets the marker information content.

allowUserPosition

Property Value
Type Boolean
Required No
Default false
Values true or false

Shows the location control and permits use of browser geolocation.

defaultShowUserPosition

Property Value
Type Boolean
Required No
Default false
Values true or false

Shows the user’s position initially when permission is already granted and no prior local preference exists. It has no effect unless allowUserPosition is true.

Property Value
Type string
Required No
Default No default
Values Any string

This saved field is not read by the production component in SDK 5.2.0 and has no visible effect.

infoIcon

Property Value
Type string
Required No
Default No default
Values Any string

This saved field is not read by the production component in SDK 5.2.0 and has no visible effect.

Examples

Client locations

{
  "cardId": "map-dynamic",
  "data": {
    "entityType": "client",
    "latJmesExpression": "location.lat",
    "lngJmesExpression": "location.lon",
    "markerMarkdownText": "**{{ name }}**\n\n{{ location.site }}"
  }
}

Each client with both coordinates becomes a clustered outdoor marker.

Behavior

The map auto-centers around available features and markers, uses a fixed fallback region when there are none, and loads OpenStreetMap tiles. Clicking a marker opens its Markdown details. The location control stores the reader’s show/hide choice in browser local storage.

Limitations and safety

Coordinates must be valid Leaflet latitude and longitude values. Geolocation can expose a user’s position in the browser and should only be enabled when operationally necessary.

See Static map.