Was this page helpful?
Yes No

Use Mapbox Maps

If you have access to Mapbox maps, you can add them to your workbooks or use them to create map views in Tableau Desktop.

When you publish a view that uses Mapbox maps to Tableau Server, Tableau Online, or Tableau Public, your audience can view your data and your Mapbox map without having a Mapbox account.

Add a Mapbox map to your workbook

In Tableau Desktop, you can add a Mapbox map to your workbook and use it as a background map.

After you add a Mapbox map to your workbook, the map is saved with the workbook and available to anyone with whom you share the workbook. You can also save a Mapbox map as a Tableau Map Source (.tms) file that you can share with others so they can quickly connect to it and use it in their own workbooks. For more information, see Save a Map Source .

  1. In Tableau Desktop, select Map > Background Maps > Map Services.

  2. In the Map Services dialog box, select Add > Mapbox Map.

  3. In the Add Mapbox Map dialog box, you can add a Mapbox GL map or a classic Mapbox map. To do so, you need the following from your Mapbox account:

    • API access token

    • Username

    • One or more map IDs

    • Style URL (Mapbox GL maps Only)

    For more information about any of the above items, see the Access Tokens, Maps, and Styles sections of the Mapbox API Help.

     

  4. Add a Mapbox GL map

    To add a Mapbox GL map, click Mapbox GL in the Add Mapbox Map dialog box, and then do the following:

    Note: Mapbox GL is selected by default.

    • For Style name, enter a name for the Mapbox map. This name can be anything you want, and will appear in the Background maps menu after you add the map.

    • For Url, enter a style URL for the Mapbox map you want to add.

      This URL contains the style ID for your Mapbox map, your access token, and your username. It might look similar to the following:

      https://api.mapbox.com/styles/v1/<username>/<styleid>?access_token=<access token>

      When you add the correct style URL to this field, the API access token, Username, and Layer ID fields automatically populate.

    • If you don't have a style URL for the Mapbox map, you must enter a Mapbox access token, username, and layer (map) ID to add your Mapbox map.

    Add a classic Mapbox map

    To add a classic Mapbox map, click Classic in the Add Mapbox Map dialog box, and then do the following:

    • For Style name, enter a name for the Mapbox map. This name can be anything you want, and will appear in the Background maps menu after you add the map.

    • For API access token, enter the API access token for the Mapbox map you want to add.

    • Choose a Mapbox preset style, or add one or more custom map layers:

      To use a Mapbox preset style: To add one or more map layers:

      Click Mapbox preset style, and then select a style from the drop-down menu.

      Click Custom, and then enter one or more map IDs in the space indicated.

     

  5. When finished, click OK to exit the Add Mapbox Map dialog box, and then click Close to return to the view.

Create a map view using a Mapbox map

To create a map view using a Mapbox map, select Map > Background Maps, and then select the Mapbox map you want to use. Next, build the map view. For information, see Mapping Concepts in Tableau.

Add or subtract map layers from the view

If you chose to add one or more custom layers by map ID when you connected to your Mapbox map in Tableau, you can add or subtract those layers from the view using the Map Layers pane. For more information, see Add or remove map layers in the Customize How Your Map Looks topic.

By default, all map layers appear in the view when you first add a Mapbox map to a workbook.

Note: When you use a Mapbox preset style, you can't toggle the layers within the map.

For example, if you use the Mapbox Streets map, you can't toggle streets, labels, building footprints, or administrative boundaries like you can with the Tableau map service. This is because Tableau only receives the image tiles that make up the Mapbox map.

Map layers are different from data layers in Tableau. Data Layers are pre-built tiles that include demographic information by various levels, like State, County, and Block Group. Data layers and Mapbox are independent of one another in Tableau. For more information about how data layers work, see Customize How Your Map Looks.

See also:

Use Web Map Service (WMS) Servers

Save a Map Source

Import a Map Source

Select Background Maps

Customize How Your Map Looks