This article outlines the step-by-step process involved in loading a Mapbox online map into TerraExplorer. In the workflow described below, the Mapbox online map connection parameters are added to a WMS file, which in turn, is loaded into a TerraExplorer project, and published to SkylineGlobe Server. The published WMS layer in the TEP project can then be loaded into any TerraExplorer project.
In this article:
- Step 1: Create a Mapbox map
- Step 2: Create a WMS file
- Step 3: Load and publish the layer to SkylineGlobe Server
Step 1: Create a Mapbox map
- In Mapbox, create an authorization token: Log in to or create your Mapbox account, and on the top navigation bar, click Tokens. Then on the Tokens page, click Create a token.
- Follow the steps outlined in the Mapbox Studio manual to design your custom maps.
- On the Mapbox Styles page, click the three dots to the right of the map style that you want to share, and then click Details. The style's details page is opened.
- On the right side menu, click Share.
- Under the Developer resources section, click Third party, and copy the integration URL. This URL will be used in step 2 to create the WMS file. The integration URL contains your connection parameters and the access token in this format:
Step 2: Create a WMS file
The WMS file is a textual file that contains the access URL to the Mapbox map, the access token, and the layer's projection and resolution. To create your WMS file, do the following:
- Download the Mapbox_Template.WMS template file, under the attachment section of this page.
- Open the Mapbox_Template.WMS file in a text editor.
- Edit the WMS file based on your integration URL (created in step 1.5), and then save the file.
- MPP = Meter per Pixel. This is the map's resolution in multiples of two. Use 0.14929107086948487093 for ~15 cm/p, 0.29858214173896974186 for ~30 cm/p, and so on.
- [DOMAIN] = The username of the account to which the style belongs, e.g., skyline
- [LAYERS] = Layer ID as appears in the integration URL generated above, e.g., cjr8a6uwj0cme2spee49gtcif
- [TOKEN] = Access token as appears in the integration URL generated above, e.g., pk.rgJ1Ijoic2tluZXNvZnQiLIjoiY2xkMjdf456fk1bWt5Mfds4BhZjN2cWgfdgeW4VtMGZ5dyJ9.3_C8TnwfFRB_u5ZtQd2q6kg
Step 3: Load the WMS layer into your TerraExplorer project and publish the project to SkylineGlobe Server
- Open TerraExplorer and create a new project.
Load the layer into TerraExplorer: On the Layers tab, click Imagery Layer, and in the Files of type field, select Web Map Server (*.wms). Then browse to the WMS file and click Open. The map is loaded into TerraExplorer as an imagery layer.
- Publish the project: To share the map with your clients, save your TerraExplorer FLY project to your local drive, and then connect to your SkylineGlobe Server and publish the project. The Mapbox layer can now be loaded into any TerraExplorer project simply by loading this published project.