How to add a map

You can now add a map with markers and popups to your website. Here are some examples:

Map example 1
Example of a map to the left with 3 blue markers
Map example 2
Example of a fullscreen map with 3 green markers

1) Create your mapbox account

Go to mapbox.com and create an account. It's free 🙂.

2) Add your access token

Once your account is created, find your Mapbox Access Token. See the screenshot below on where to find it:

Mapbox access token
Find your Mapbox access token

Now add a new setting in your Settings sheet. The setting name is mapbox token and your token should be its value.

Mapbox token setting
Add it as a setting in your sheet

3) Add the 'Map' content type to your sheet

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.

4) Add markers and popups to your map

There are 2 ways to add markers to your map. Depending on your needs, you would favor one over the other.

1) Add markers via the "options" cell

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:

Map options columns
Added 3 markers in the options cell.

In this example, we added 3 markers. Simply add latitude,longitude pairs as options.

2) Add markers via a data records

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:

  1. Create a new sheet in your base and make sure it has these columns:
    • 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.

    Example of location data
    The locations sheet
  2. Refer to the sheet in the options cell by adding this option:
    locations = [your locations sheet name]
    Refer the sheet with the locations option
    Refer to your sheet with the 'locations' option
Still have a question? Contact us!