update v1.101.0
New features have been added. See below for details.
@ts11 @justinnnnnn @jeffprewitt
NEW ACTION
Draw list of shapes
This action is a simplified version of the ‘Draw shape’ action and as such only contains a subset of the options available. The color fields supplied in this action are going to come from a list of texts in your database. Both HEX and RGBA values will work. Using transparency with HEX colors will require the 2 additional transparency digits appended to the end which you can get here - hex transparency codes
-Slow iterations
If you have a need to slow the iterations on adding each item in the list, then set this value to a number in milliseconds. By default, this is disabled and it will run as fast as possible.
-Shape types
Supply a list of shape types here, this is the type of shape that you want to draw onto the map. Accepted values in this list can be polygon, polyline, rectangle and circle.
-Shape coordinates
Supply a list of coordinates which make up the shape. You should use the coordinates which are contained in the various Drawing states to make sure the format is correct.
-Fill colors
Supply a list of fill colors here. Leaving this field blank (or having a missing value in the list) will apply a default value of #FF000073 (red with 45% transparency) to the shape added.
-Stroke weights
Supply a list of stroke weights (border thickness) for the shapes in pixels. For a Polyline, a value of 0 will be replaced with 1 otherwise you cannot see the line. Leaving this field blank (or having a missing value in the list) will apply a default value of 0 to the shape added.
-Stroke colors
Supply a list of stroke weight colors (border color) for the shapes. Leaving this field blank (or having a missing value in the list) will apply a default value of #9E0000 (dark red with 100% transparency) to the shape added.
-Stroke weights (select)
Supply a list of stroke weights (border thickness) which are applied to shapes when the shape is selected to define the thickness of the border. Leaving this field blank (or having a missing value in the list) will apply a default value of 6 to the shape added.
-Stroke colors (select)
Supply a list of stroke weight colors (border color) which are applied to shapes when the shape is selected to define the color of the border. Leaving this field blank (or having a missing value in the list) will apply a default value of #9E0000 (dark red with 100% transparency) to the shape added.
-Info window texts
Supply a list of info window texts which display in the info window when the shape is clicked. Leaving this field blank disables the info window popups for all shapes added.
-Shape Id’s
Supply a list of shape Id's here. If specified, you can use custom Id's for any shape, or a list of unique Id's from a table. Not specifying an Id will generate a random one for each shape added. This allows you to later use this Id to select, remove or perform other actions based on these shapes.
The following options will apply to all shapes in the list when their events trigger and not when they’re first added to the map (unlike the Draw shape action). For example, when a shape is clicked, dragged, resized etc.
-Measure length
When set to Yes, will populate the corresponding 'Measured length' exposed state with a value in the specified units.
-Measure area
When set to Yes, will populate the corresponding 'Measured area' exposed state with a value in square meters. Note: This will be ignored for a polyline.
-Units
Select the unit to measure the length calculations in (Meters, Miles, Kilometers)
-Get center
When set to Yes, will populate the 'Center coordinates' states with latitude and longitude values.
-Contains markers
When a shape (not a polyline) is drawn and there are markers within the boundaries of that shape, switching this option to Yes will populate the list states 'Contains markers latitude', 'Contains markers longitude' and 'Contains marker Ids'.
-Editable
Make the shape editable.
-Draggable
Make the shape draggable.
-Go to coordinates
Set the map position to these coordinates after the list of shapes have been added. Value must be in the format of latitude, longitude, for example: 51.20911516189098,-1.5825777840614275
STATES
-
Loading markers
When a list of markers is being added to the map, this state become Yes, otherwise it's No.
-
Loading shapes
When a list of shapes is being added to the map, this state become Yes, otherwise it's No.
ADDRESS LOOKUP STUFF
There’s a new object type state called “Addresses inside shape” and it’s been created to work with the client-side version of the “Contains location” action. You must first configure it as shown.

The details are in the document field as shown here. You can supply this action a list of Bubble addresses and tell it a shape, then it will return the addresses that are within that shape only. This will also trigger an event once it’s completed running, called ‘Contains location completed’.

If you’re running the server-side version of this action, then it does the same but it returns the addresses like this…

The demo page now has a full working example using both versions of these. Read what I’ve written and hopefully it will make some sense!
OTHERS MINOR TWEAKS
Both actions which add lists of markers and shapes, now include an option to slow the iterations per list item, just in case you need to control that for any reason. They have the same setting and have been set to 200ms in the demo page mainly to give enough time for the loading marker/shape states to change to Yes.

Both actions which add single markers and shapes, include this new option so you can control whether you want to trigger the associated ‘drawn’ events.

Paul