> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ja/atlas/v2/llms.txt)

# Use Atlas with third-party products

## Create a WMS from Atlas using MapProxy

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](https://mapproxy.org/) and the [Mapbox Static Tiles API](https://docs.mapbox.com/help/glossary/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 displaying map of Singapore side by side with a MapProxy WMS Viewer pointed at the Atlas server](https://docs.mapbox.com/ja/assets/ideal-img/atlas-mapproxy.2e7ea24.480.png)

*Atlas server (left) with MapProxy WMS Viewer pointed at Atlas server (right)*

### Create a new virtual environment

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](https://mapproxy.github.io/mapproxy/latest/install.html) documentation.

Create a new virtual environment. To do this you will need [virtualenv](https://virtualenv.pypa.io/en/latest/tutorial/getting-started.html) installed.

```bash
$ virtualenv --system-site-packages mapproxy
```

Activate the MapProxy virtual environment:

```bash
$ source mapproxy/bin/activate
```

### Install dependencies

For more information, see official [MapProxy Dependency details](https://mapproxy.github.io/mapproxy/latest/install.html#dependency-details) documentation.

#### Debian or Ubuntu system

Install required dependencies:

```bash
$ sudo apt-get install python-pil python-yaml libproj12
```

#### macOS

Install required dependencies:

```bash
$ pip install Pillow PyYAML pyproj
```

### Install MapProxy

Install MapProxy with [pip](https://pip.pypa.io/en/stable/):

```bash
$ pip install MapProxy
```

Verify installation was successful:

```bash
$ mapproxy-util --version
```

You should see something like:

```bash
MapProxy 1.12.0
```

### Create a new MapProxy service

```bash
$ 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.

-   Replace `your-atlas-url` with 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.
-   Replace `your-atlas-public-token` with your public token, which is located in your Atlas account dashboard.

```bash
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:

```bash
$ cd atlas-server
$ ./atlas.sh start
```

Once the config `mapproxy.yaml` file is saved, start the MapProxy server:

```bash
$ mapproxy-util serve-develop -b 0.0.0.0 mapproxy.yaml
```

### Access the native MapProxy WMS Viewer

Replace `your-ip-address` with your MapProxy server address (for example, `localhost:8080`):

```bash
http://<your-ip-address>/demo/?srs=EPSG%3A900913&format=image%2Fjpeg&wms_layer=mapbox-streets
```

#### Access MapProxy WMS `GetCapabilites`

Use the `GetCapabilites` request to access information about a WMS service, including supported image formats and available map layers.

```bash
http://<your-ip-address>/service?REQUEST=GetCapabilities
```