icon picker
List of workflows and events

The smartest man is the one best informed

How many?

Currently the plugin doesn’t have too many events and workflow steps, but later updates will bring more or better functionality, because of that, this page should be checked after every update.

Exposed elements

Exposed elements are the values that are held inside the mapbox map element. These values are what’s sent back from the plugin for the app to use, like coordinates, selected item type or ID.
There are 6 exposed elements and you can access them in workflows or in any place where you can fill dynamic data:
paveikslas.png
Here’s what each element means:
● Selected marker longitude - longitude of last interactively added marker. Type - number
● Selected marker latitude - latitude of the last interactively added marker. Type - number
● Line coordinates - coordinates of the last interactively added line in format: [0,0],[1,1],[2,2],[3,3]. Type - text
● Polygon coordinates - coordinates of the last interactively added polygon in format: [0,0],[1,1],[2,2],[3,3]. Type - text
● Type - type of the last interactively added element. Type - text
● Selected item ID - the ID of the last element clicked on the map. Type - text

Actions

Actions are steps in a workflow that trigger certain code in the plugin.
They are accessed by adding an action in a workflow.
TIP: an easy way to find all actions associated with the plugin is pressing on “Click here to add an action..” inside a workflow and type “mapbox” inside the search bar:
paveikslas.png
Here’s a list of all current actions, all of the actions will need an element. The element should be the mapbox item you added on the map:
● Add draggable marker - adds a marker that you can drag around the map (limit - 1 marker per map)
Fields needed: long - longitude of where to place the marker
lat - latitude of where to place the marker
paveikslas.png
● Remove draggable marker - removes the draggable marker from the map. No fields are needed to fill.
paveikslas.png
● Add marker - adds a marker on the map
Fields needed: Longitude - the longitude of the marker (type - number)
Latitude - the latitude of the marker (type - number)
ID - the ID of the marker (type - text) (TIP: it’s usually best to use the unique ID of the
marker created in bubble database)
image - the image the marker uses, can either be a static image of a dynamic image
title - the title that is shown under the marker, leave blank if no title is needed.
paveikslas.png
● Add line - adds a line on the map
Fields needed: color - the color of the line (must be in HEX code, for example: #111111) (type - text)
coordinates - the coordinates of each line point (type - text) (must be in such format: “[0,0],
[1,1],[2,2],[3,3]”)
id - the ID of the line (type - text) (TIP: it’s usually best to use the unique ID of the
line created in bubble database)
paveikslas.png
● Add polygon - adds a polygon on the map
Fields needed: color - the color of the outline (type - text) (must be in HEX code, for example: #111111)
coordinates - the coordinates of each polygon point (type - text) (must be in such format: “[0,0],
[1,1],[2,2],[3,3]”)
fill color - the color of the polygon fill (type - text) (must be in HEX code, for example: #111111)
fill opacity - the opacity of the polygon fill (type - number) (must be in decimals between 0 and 1)
id - the ID of the polygon (type - text) (TIP: it’s usually best to use the unique ID of the
line created in bubble database)
paveikslas.png
● Delete selected item - deletes a chosen element from the map, that being a marker, line or a polygon. You choose items pressing on them on the map, which returns their ID. More on how to select items the Events in this page.
Fields needed: id - the ID of the selected item (type - text)
type - the type of the selected item (text - text) (must be one of 3 options: marker, line, polygon)
paveikslas.png

Events

Events are workflows in the bubble app that are triggered after a certain action (workflow step inside bubble app) is done in the plugin.
These events can be accessed and added as any other workflow of an element:
paveikslas.png
The events of the mapbox can be found in the “Elements” tab while adding a workflow event.
Currently there is one Event that is triggered when you add any element on the map interactively (more on that in )
paveikslas.png
It works like any other workflow and it can do any actions, but it’s intended use is to save the element in bubble database and add the element on the map without the need to refresh the page (more on that in )

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.