简体   繁体   中英

Mapproxy shows tiles in wrong position

I am using Mapproxy to display map http://maps.stamen.com/toner/#3/49.78/-4.04 . But the tiles are shown in wrong position. For example:

Map without zoom:

Map with one level zoom:

More zoomed, the image looks even more odd.

Mapproxy configuration:

layers: 
  - name: StamenToner
    title: StamenMap
    sources: [stamen_cache]  

caches:
  stamen_cache:
    grids: [stamen_grid]
    sources: [stamen_wmts]

sources:  
  stamen_wmts:
    type: tile
    url: http://tile.stamen.com/toner/%(z)s/%(y)s/%(x)s.png
    grid: stamen_grid

grids:
    stamen_grid:
        srs: 'EPSG:3857'
        origin: 'nw'
        tile_size: [512, 512]

I have no idea why the tiles are in wrong position when zoomed. Any suggestions.

This works for me with MapProxy==1.13.0

layers:
  - name: StamenToner
    title: StamenMap
    sources: [stamen_cache]

caches:
  stamen_cache:
    sources: [stamen_tiles]

sources:
  stamen_tiles:
    type: tile
    url: http://tile.stamen.com/toner/%(z)s/%(x)s/%(y)s.png
    grid: GLOBAL_WEBMERCATOR

Note : Check the URL parameter order. /z/x/y rather than /z/y/x ; according to the docs :

Many applications and libraries understand the notion of map URL templates. These are ours:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM