Navigation
This documentation refers to the on-premises edition of MongoDB Charts. Read the Atlas service documentation to learn how to use MongoDB Charts with your Atlas project.
  • Administration >
  • Configure Geospatial Tile Server and Attribution Message

Configure Geospatial Tile Server and Attribution Message

Overview

You can configure the following properties of your geospatial charts:

Tile Server
Tile servers provide geospatial charts with map images. By default, Charts connects to a cloud-hosted tile server.
Attribution Message
The attribution message is the text that is displayed at the bottom of geospatial charts. Typically, this message contains licensing information regarding the tile server.

Configure Tile Server and Attribution Message

You can specify your own tile server and attribution message for geospatial charts in your Charts Docker Compose file.

To configure your tile server and attribution message:

1

Open your MongoDB Charts Docker Compose file.

Open the Docker Compose file you downloaded as part of the Charts Installation Procedure.

2

Define your tile server and attribution message variables.

Add CHARTS_TILE_SERVER and CHARTS_TILE_ATTRIBUTION as variables to the environment section of your Compose file.

3

Specify the URL of your tile server as the value of the CHARTS_TILE_SERVER variable.

The following table describes the tile server URL components:

Variable Definition Data Type
{x} X tile number Integer
{y} Y tile number Integer
{z} Zoom level Integer

Example

The following CHARTS_TILE_SERVER variable uses map tiles from Stamen Maps:

http://tile.stamen.com/terrain/{z}/{x}/{y}.jpg
4

Specify your attribution message as the value of the CHARTS_TILE_ATTRIBUTION variable.

The variable follows standard Markdown syntax.

Example

Use the following Markdown to specify a custom attribution message for Stamen map tiles:

Map tiles by [Stamen Design](http://stamen.com),
under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0).
Data by [OpenStreetMap](http://openstreetmap.org), under [ODbL]
(http://www.openstreetmap.org/copyright).
5

Redeploy MongoDB Charts.

If MongoDB Charts is already running, remove the Charts Docker stack using the following command:

docker stack rm mongodb-charts

Before redeploying, you need to ensure that the Charts containers are fully shut down. You can confirm this by running the docker ps command several times, until it shows no running Charts containers.

Once all Charts containers have shut down, relaunch the stack using the following command:

docker stack deploy -c charts-docker-swarm-19.06.1.yml mongodb-charts

Note

If you are using a different version of Charts, replace 19.06.1 with the version number of your release.