MapProxy needs a couple of configuration files. One defines the layers, caches, and services that it runs. The other is used for “seeding” the cache, and specifies what to pre-render.
There’s a lot of documentation on MapProxy configuration files, and example ones can be created with mapproxy/bin/mapproxy-util create -t base-config
.
The first file is mapproxy.yaml
, which defines the layers to be rendered
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
This file can be tested with the command mapproxy/bin/mapproxy-util serve-develop mapproxy.yaml
, then the URL http://localhost:8080/tiles/1.0.0/osm/GLOBAL_WEBMERCATOR/0/0/0.png
should be a single tile covering the world.
The second file is seed.yaml
1 2 3 4 5 |
|
This sets up a seeding area covering the entire world from zoom 0 to zoom 8. The seeding can be run with mapproxy/bin/mapproxy-seed -s seed.yaml -f mapproxy.yaml
and the -c
option can be added to set parallelism. After this is done, the tiles are generated, they just need to be packaged.