Skip to main content

Mapbox Map

This node adds a map to the visual tree, using Mapbox. The map can be both interactive and static.

Markers can be placed on the map by sending an array of marker objects containing Lat, Lon and Color to the Markers input. Color can be specified as a string, (e.g. "White") or as a hex string (e.g. "#ffffff").

Inputs

DataDescription
LongitudeSets the current active longitude.
LatitudeSets the current active latitude.
ZoomSets the zoom level of the map.
MarkersAn array of markers on the map. Every marker is defined as an object containing the properties Lat, Lon , and Color.
TypeSpecifies the Marker type. Can be either Default or Image
SourceSpecifies the source of the Marker image. Only available if the Marker is om Image type.
WidthSpecifies the width of the Marker image (in pixels). Only available if the Marker is om Image type.
HeightSpecifies the height of the Marker image (in pixels). Only available if the Marker is om Image type.
AnchorSpecifies the the anchor point of the Marker image in relation to the location on the map. Only available if the Marker is om Image type.
InteractiveSets if users can interact with the map or not.
StyleA path to a Mapbox Style.
SignalDescription
Center on userSend a signal to this port to center the map to the current active latitude and longitude.

Outputs

DataDescription
(Coordinates) LongitudeThe current active longitude.
(Coordinates) LatitudeThe current active latitude.
ZoomThe current zoom level of the map.
(Map Clicked) LongitudeThe longitude that where the user clicked last. To be used with the Click signal.
(Map Clicked) LatitudeThe latitude that where the user clicked last. o be used with the Click signal.
Marker IdIf you have clicked a marker on the map, this port will send the Id of the clicked marker.
WidthThe with of the map container.
HeightThe height of the map container.
Screen Position XThe amount of pixels between the left side of the window and the left side of the map container.
Screen Position YThe amount of pixels between the top of the window and the top side of the map container.
SignalDescription
ClickSends a signal when the map is clicked.
Marker ClickSends a signal when a marker is cliked.
Map LoadedSends a signal when the map has finished loading, after it has been mounted in the app.
Map MovedSends a signal after the map in view has been moved.
Did MountSends a signal when the map has been rendered in the app, before the map has been loaded.
Will UnmountSends a signal before the map will be removed from the visual tree.