MapBox Maps Plugin

Demo to preview the settings

Introduction

Show your own MapBox map styles & 3D buildings inside your bubble app. Live user tracking, Markers, FlyTo, Pitch, Bearing, Zoom & Coordinate Control. MapBox Direction, Scale & Movement Controls + Much More!
Use the MapBox element to show your maps in your own styles. Then give your map life using the element actions. On mouse click, the plugin returns states that contain Latitude & Longitude as well as address.
The plugin also returns states with a list of markers, map's center address and you can trigger workflows when a marker is clicked.

Prerequisites

API Key (register and get key at https://www.mapbox.com/)
  1. Create account https://account.mapbox.com/auth/signup/
Note: The plugin uses the Directions API and the Mapbox GL JS APIs, which are paid after the free limit is exceeded. To clarify the price please visit the pricing page: https://www.mapbox.com/pricing.
Image without caption

Tutorial

Real use case in the template

Hotel Finder Map Template for Bubble
Hotel Finder Map Template page on Bubble. Use this template to speed up your app development. Bubble lets you build web apps without any code.
Hotel Finder Map Template for Bubble

How to setup

  1. Go to https://account.mapbox.com/
  1. Copy Access token
Note: This is a public Access token! You can access tokens more secure by adding URL restrictions. When you add a URL restriction to a token, that token will only work for requests that originate from the URLs you specify. Tokens without restrictions will work for requests originating from any URL.
Image without caption
Image without caption
4. Put it in plugin fields
Image without caption
5. Place the MapBox Map element on the page
Image without caption

Plugin Element - Mapbox Map

Fields

Element states

Element events

Mapbox Map Element Actions

1) Set Style

2) Turn 3D Building On

3) Add Marker

4) Fly To

5) Turn 3D Buildings Off

6) Remove Marker

7) Start Location Tracking

8) Stop Location Tracking

9) Set Center

10) Set Zoom

11) Set Bearing

12) Set Pitch

13) Set Directions

14) Add List of Markers

15) Toggle Controls Visibility

16) Remove Directions

17) Create a line

18) Create a heatmap layer

19) Add icon to map

20) Change language

21) Remove all markers

22) Create a symbol layer

23) Create a draggable marker

24) Toggle map rotation

25) Display popup on hover

26) Add fullscreen control

27) Add geocoder

28) Draw polygon

29) Enable measure distance

30) Disable measure distance

31) Filter features within map

32) Add a video

33) Create an animated route

34) Add 3D terrain

35) Remove 3D terrain

36) Animate the camera along a path

37) Remove Draggable Marker

38) Get Markers in Drawed Polygons

39) Add live realtime data

40) Check If marker is in polygon

41) Check if point is in geofence around the marker

42) Create Clusters

43) Remove Line or Polygon

44) Remove a symbol layer

45) Remove Clusters

46) Remove live realtime data

47) Set Autofill (from, to)

48) What markers are in polygon?

49) Set Area

50) Create US zip code area

51) Remove zip code area

Plugin API calls

Get Route Data (Full)

Return generated by MapBox route from Origin to Destination. Return response with all fields. Read https://docs.mapbox.com/api/navigation/directions/#retrieve-directions
Title
Description
Type
Origin Lng
Route start position longitude
Number, Required
Origin Lat
Route start position latitude
Number, Required
Destination Lng
Route end position longitude
Number, Required
Destination Lat
Route end position latitude
Number, Required
Type
Type of route. Can be: driving-traffic, driving, cycling, walking
Enum Text, Required
Access Token
Your default access token is available on your Account Dashboard
Text, Required
Language
Language of the response
Text, Required

Get Route Data (Simple)

Return generated by MapBox route from Origin to Destination.
Title
Description
Type
Origin Lng
Route start position longitude
Number, Required
Origin Lat
Route start position latitude
Number, Required
Destination Lng
Route end position longitude
Number, Required
Destination Lat
Route end position latitude
Number, Required
Type
Type of route. Can be: driving-traffic, driving, cycling, walking
Enum Text, Required
Access Token
Your default access token is available on your Account Dashboard
Text, Required
💡
Tip: For more information read MapBox Docs

Workflow example

Here are some setups that will help to understand the plugin better.

Live Tracking

Image without caption

Changelogs