You can now add a map with markers and popups to your website. Here are some examples:
Go to mapbox.com and create an account. It's free 🙂.
Once your account is created, find your Mapbox Access Token. See the screenshot below on where to find it:
Now add a new setting in your Settings
sheet. The setting name is mapbox token
and your token should be its value.
Go to your Content
sheet and add a new row. The type of the row should be Map
.
The map type has a few options. Check them out here.
There are 2 ways to add markers to your map. Depending on your needs, you would favor one over the other.
If you only need a few markers and no popups when clicking a marker, this method is what you're after.
Add markers by adding locations to the options
cell of the row:
In this example, we added 3 markers. Simply add latitude,longitude pairs as options.
If you are planning on displaying more pins, and you want them to have a popup when clicked, then this method is for you.
Follow these steps:
Latitude
with field type number
and decimal format (precision: 6). Contains the marker latitude.Longitude
with field type number
and decimal format (precision: 6). Contains the marker longitude.Title
with field type single line text
. Contains the title to display in the popup.Description
with field type long text
. Contains the description to display in the popup.Image
with field type attachment
. Contains an image to display in the popup.Only Latitude
and Longitude
columns are obligated.
options
cell by adding this option:locations = [your locations sheet name]