Use Atlas with third-party products
Web Map Service (WMS) is a standard protocol for serving georeferenced map images. These images are commonly produced by a map server from data provided by a GIS database. With Atlas, you can serve WMS sources by using MapProxy and the Mapbox Static Tiles API.
MapProxy is an open source proxy for geospatial data that you’ll point to the Mapbox Static Tiles API. As WMS requests come in, MapProxy makes a request to Atlas, saves the tile in the cache, and then serves it.
Atlas server (left) with MapProxy WMS Viewer pointed at Atlas server (right)
This setup assumes that Atlas is running and accessible by the MapProxy host. With this installation method, MapProxy is installed on the same host as Atlas. You will need a working Python installation (version 2.7 and 3.4 or higher) to use MapProxy. For more information, see official MapProxy installation documentation.
Create a new virtual environment. To do this you will need virtualenv installed.
virtualenv --system-site-packages mapproxy
Activate the MapProxy virtual environment:
Install MapProxy with pip:
pip install MapProxy
Verify installation was successful:
You should see something like:
mapproxy-util create -t base-config mymapproxy cd mymapproxy/ cp mapproxy.yaml mapproxy.yaml-orig
Use the following configuration values in
mapproxy.yaml to access the Mapbox Static Tiles API and generate a WMS from the Mapbox Streets tileset.
your-atlas-urlwith the MapProxy-accessible URL of the Atlas server. If MapProxy and Atlas are running on the same server, this should be
[atlasProtocol]://localhost:[atlasPort]which is the default Atlas URL in this scenario.
your-atlas-public-tokenwith your public token, which is located in your Atlas account dashboard.
services: demo: kml: wmts: wms: md: title: MapProxy Atlas Server WMS Proxy abstract: MapProxy and Atlas Server example layers: - name: mapbox-streets title: Mapbox Atlas Server - Streets sources: [mb_street] caches: mb_street: grids: [webmercator] sources: [mb_street_tiles] sources: mb_street_tiles: type: tile grid: GLOBAL_WEBMERCATOR url: <your-atlas-url>/styles/v1/mapbox/streets-v10/tiles/256/%(z)s/%(x)s/%(y)s?access_token=<your-atlas-public-token> grids: webmercator: base: GLOBAL_WEBMERCATOR origin: 'nw' tile_size: [256,256]
Start your Atlas server if it is not already running:
cd atlas-server ./atlas.sh start
Once the config
mapproxy.yaml file is saved, start the MapProxy server:
mapproxy-util serve-develop -b 0.0.0.0 mapproxy.yaml
your-ip-address with your MapProxy server address (for example,
GetCapabilites request to access information about a WMS service, including supported image formats and available map layers.