1

I'm trying to display tiles rendered through Mapnik in Mapproxy.

I got it to work correctly for the first zoom level:

enter image description here

But two zoom levels in, the tiles are already combined in a wrong way:

enter image description here

My tiles are served through Mapnik. I followed the following tutorial:

https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04

I can display the tiles correctly through OpenLayers on a slippymap.

Here's my current mapnik configuration:

services:
  demo:
  tms:
    use_grid_names: true
    # origin for /tiles service
    origin: 'sw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: MapProxy Configuration for mapnik

layers:
  - name: mapnik
    title: TMS layer from tiles
    sources: [osm_cache]

caches:
  osm_cache:
    grids: [webmercator]
    sources: [osm_tiles]

sources:
   osm_tiles:
     grid: webmercator
     type: tile
     url: http://10.77.70.19/osm_tiles/%(z)s/%(x)s/%(y)s.png

grids:
    webmercator:
        base: GLOBAL_WEBMERCATOR
        origin: 'sw'

globals:

Some layers further in, everything seems to be okay again:

enter image description here

Is it possible for Mapproxy to show the correct map at all? And if it's not, what are my alternatives?

0

I finally found a configuration that works, mostly through trial and error:

services:
  demo:
  tms:
    use_grid_names: true
    origin: 'nw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: MapProxy Configuration

layers:
  - name: bel_mapnik
    title: TMS layer from tiles
    sources: [osm_cache]

caches:
  osm_cache:
    grids: [osm_grid]
    sources: [osm_tiles]
    format: image/png

sources:
   osm_tiles:
     grid: GLOBAL_WEBMERCATOR
     type: tile
     transparent: true
     url: http://10.77.70.19/osm_tiles/%(z)s/%(x)s/%(y)s.png

grids:
    osm_grid:
        srs: EPSG:900913
        origin: nw

globals:

I hope this will be helpful to somebody.

  • 2
    It would be much more helpful if you would describe what was wrong. – TomazicM Jul 3 at 7:50
  • The pertinent difference seems to be using a nw origin rather than a sw one. – alphabetasoup Jul 3 at 10:32

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.