1

I have Mapserver running, reading from a raster file, which I can overlay over Google Maps using its Javascript API. Now, for caching of tiles, I need to use MapProxy URL for Google Maps overlay. How do I do that?

2

You need to install mapproxy on your laptop and use mapproxy-serve to configure correctly mapproxy.

Mapproxy configuration is based on a yaml file.

In this file you need to declare your mapserver URI (WMS, WMTS, TMS, or whatever) as your source.

Then you have to choose a cache directory.

Finally you need to expose a layer.

A configuration example :

services:
  demo:
  tms:
    use_grid_names: true

layers:
  - name: my-layer
    title: This is a great layer
    sources: [my-cache]

caches:
  my-cache:
    grids: [GLOBAL_WEBMERCATOR]
    sources: [mapserver]
    format: image/png

sources:
  mapserver:
    type: tile
    url: http://your-map-server-url/tile/%(z)s/%(y)s/%(x)s
    grid: GLOBAL_WEBMERCATOR

The Mapproxy configuration documentation is pretty complete: https://mapproxy.org/docs/1.9.0/configuration.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.