Aller au contenu principal

Map Element

This element is map font of Map Context. Only one map can be added on this context. We suggest to first enter longitude and latitude of map center. This element must be used with Map context.

Icon

MapIcon

HMI Representation

MapElement

External parameters

Show/Hide all parameters
parametereditable via "Parameter" tabupdatable via a mappingdescriptionunittype
Longitude✔️✔️Initialize map longitude on scenario openingdegreeDecimal number
Latitude✔️✔️Initialize map latitude on scenario openingdegreeDecimal number
Map Style✔️✔️Mapbox Map style. See Mapbox website for available style. (Ex: streets-v11)-Text
Visibility✔️✔️This parameter allows you to choose if you want the element to be visible or not on the scene during the execution of the scenario. If the item is part of a group, it can inherit the value of that group.-Enumeration (visible, hidden, inherit)
X-axis positionPosition of the element's upleft corner on the X-axis.meterDecimal number
Y-axis positionPosition of the element's upleft corner on the Y-axis.meterDecimal number
LengthLength of the Map.meterDecimal number
WidthWidth of the Map.meterDecimal number
Draw Polygon propertyThis parameter defines various properties of the polygon, such as, its points, its center, and its ID (It also applies to rectangles).-List of points, Polygon Center, Polygon type, Polygon Id

Triggered behaviours

See Triggered behaviours and events page for more explanation: Triggered behaviours and events.

Show/Hide all triggered behaviours

Destroy

At the reception of the flow, the element is destroy.

No parameters for this triggered behaviour.

Add/Update Marker on map

Add marker on map or update it if it already exist.

Show/Hide all parameters
parametersdescriptionunittype
IdThe marker id to add/update.-Text
LongitudeThe longitude of the marker.degreeDecimal number
LatitudeThe latitude of the marker.degreeDecimal number
SVG DefinitionThe definition of the marker. Make sure your SVG is valid before entering a value in field. Choose a preset definition.-Text
Name of the layerThe name of the layer.-Text
Marker informationInformation of the marker displayed in popup.-Text

Clear marker

Clear specific marker if it already exists.

Show/Hide all parameters
parametersdescriptionunittype
IdThe marker id to clear.-Text

Add/Update Polyline on Map

Add Polyline on map or update it if it already exists.

Show/Hide all parameters
parametersdescriptionunittype
IdThe polyline id to add/update.-Text
TrajectoryTrajectory with list of coordinates (ex: [[lng,lat],[lng,lat],...])-List of coordinates
ColorThe color of the polyline. You can use HEX,RGB.. color (ex: #000000 is black)-Text
Name of the layerThe name of the layer.-Text

Clear polyline

Clear specific polyline if it already exists.

Show/Hide all parameters
parametersdescriptionunittype
IdThe polyline id to clear.-Text

Add/Update Polygon on map

Add Polygon on map or update it if it already exists.

Show/Hide all parameters
parametersdescriptionunittype
IdThe polygon id to add/update.-Text
Polygon GeometryGeometry with list of coordinates (ex: [[lng,lat],[lng,lat],...])-List of coordinates
Fill ColorThe color inside the polygon . You can use HEX,RGB.. color (ex: #000000 is black)-Text
Stroke ColorThe color of the polygon edge. You can use HEX,RGB.. color (ex: #FFFFFF is white)-Text
Fill OpacityThe opacity of the fill color (a decimal between 0 and 1, 0 is transparent)-Decimal
LayerThe name of the layer-Text
Information aboutInformation about this polygon, information is displayed when you click on the polygon-Text

Clear Polygon

Clear specific polygon if it already exists.

Show/Hide all parameters
parametersdescriptionunittype
IdThe polygon id to clear.-Text

Events

See Triggered behaviours and events page for more explanation: Triggered behaviours and events.

Show/Hide all events
eventdescription
On Parameter Value ChangedThe element can send information to the model when the value of the selected parameter has changed
At initializationThe map can send information to the model once at initialization.
ContinuallyThe map can send information to the model continuously.
On Map Element DrawThe map can send information each time you draw a new polygon on the map, when connecting the last point of the polygon to the first, or when clicking on the Finish button while placing the polygon points. Also works with rectangles.
On Map Element EditionThe map can send information each time you edit an already existing polygon on the map, when clicking the Save button. Also works with rectangles.
On Map Element DeletionThe map can send information each time you delete a polygon on the map, when clicking on the Save button after selecting a polygon to delete, or when clicking on the Clear All button. Also works with rectangles.

Polygons

Both in Run mode and in Edit mode, it is possible to draw a polygon or a rectangle right on the map, by using the set of tools available on the top-right of the Map context. The options are the following:

  • Draw a polygon: Let you define each point of a new polygon.
  • Draw a rectangle: Allows to easily define a polygon by creating a rectangle directly.
  • Edit Layers: Let you edit already existing polygons or rectangles on the map.
  • Delete Layers: Let you delete any polygon or rectangle on the map.

Here is an example of a polygon creation, edition, and deletion:

Polygon on map being created, edited and deleted