World Map
Description
The World Map component lets a scenario author draw one geometry on an interactive map. The geometry is stored in the scenario and is returned for every processed record, so downstream expressions can use it like any other output variable.
The available modes are:
- Point - one geographic point.
- Line - a line between exactly two points.
- Shape - a closed polygon with at least three points. The last point is connected to the first automatically.
- Circle - a center point and radius.
Click the map to add coordinates. In Shape mode, add at least three coordinates and click the first one to close the shape; afterward, click an edge to insert a coordinate and click a coordinate to remove it. Coordinates can also be dragged. Use Reset to clear the geometry.
Parameters and output
| Name | Description |
|---|---|
| Mode | Geometry to draw: Point, Line, Shape, or Circle. |
| Geometry | Interactive map editor for the selected mode. |
| Output | Name of the variable made available to downstream nodes. |
The output type depends on the selected mode:
| Mode | Output |
|---|---|
| Point | A record with lat and lon fields. |
| Line | A two-element list of records with lat and lon fields. |
| Shape | A list of at least three records with lat and lon fields. The closing point is not repeated. |
| Circle | A record with lat, lon, and radiusMeters fields. lat and lon describe the center. |
For example, if the output variable is named area, a point can be accessed as #area.lat and #area.lon. A shape's
first coordinate can be accessed as #area[0].lat and #area[0].lon.
Checking whether a point is inside a shape
Use the GEO helper with a Point and a Shape returned by World Map:
#GEO.isInsideArea(#point, #area)
You can also pass coordinates directly:
#GEO.isInsideArea(#event.lat, #event.lon, #area)
The shape is closed automatically between its last and first coordinates. A point on the shape's edge or vertex is considered inside.
Map configuration
The editor uses MapLibre GL JS and
Terra Draw. The default map style is a dark theme matching the
Designer colors, served by OpenFreeMap. It does not require an API key and can be
replaced with any MapLibre-compatible style URL. Configure it in the base component provider:
components {
base {
worldMap {
styleUrl: "https://tiles.openfreemap.org/styles/dark"
initialLatitude: 52.0
initialLongitude: 19.0
initialZoom: 5.0
}
}
}
For installations with stricter availability, privacy, or network requirements, configure a style and tiles hosted by your organization or by a map provider covered by an appropriate service agreement. Browser access to the configured style, tiles, sprites, and fonts must be allowed by Content Security Policy and CORS settings.