2.6. MapProxy case: layer merging#

2.6.1. Example#

http://webgis.pub:6003/

2.6.2. MapProxy configuration file#

  1caches:
  2  maplet_WorldCountry:
  3    grids:
  4    - webmercator
  5    sources:
  6    - maplet_WorldCountry
  7  maplet_WorldRailway:
  8    grids:
  9    - webmercator
 10    sources:
 11    - maplet_WorldRailway
 12  maplet_WorldRiver:
 13    grids:
 14    - webmercator
 15    sources:
 16    - maplet_WorldRiver
 17  maplet_WorldRoad:
 18    grids:
 19    - webmercator
 20    sources:
 21    - maplet_WorldRoad
 22  maplet_mulwold:
 23    grids:
 24    - webmercator
 25    sources:
 26    - maplet_WorldCountry
 27    - maplet_WorldRailway
 28    - maplet_WorldRiver
 29    - maplet_WorldRoad
 30  osm_cache:
 31    grids:
 32    - webmercator
 33    sources:
 34    - osm_wms
 35globals: null
 36grids:
 37  webmercator:
 38    base: GLOBAL_WEBMERCATOR
 39layers:
 40- name: osm
 41  sources:
 42  - osm_cache
 43  title: Omniscale OSM WMS - osm.omniscale.net
 44- name: maplet_WorldRailway
 45  sources:
 46  - maplet_WorldRailway
 47  title: maplet_WorldRailway
 48- name: maplet_WorldRoad
 49  sources:
 50  - maplet_WorldRoad
 51  title: maplet_WorldRoad
 52- name: maplet_WorldCountry
 53  sources:
 54  - maplet_WorldCountry
 55  title: maplet_WorldCountry
 56- name: maplet_mulwold
 57  sources:
 58  - maplet_mulwold
 59  title: maplet_mulwold
 60- name: maplet_WorldRiver
 61  sources:
 62  - maplet_WorldRiver
 63  title: maplet_WorldRiver
 64services:
 65  demo: null
 66  kml:
 67    use_grid_names: true
 68  tms:
 69    origin: nw
 70    use_grid_names: true
 71  wms:
 72    md:
 73      abstract: This is a minimal MapProxy example.
 74      title: MapProxy WMS Proxy
 75  wmts: null
 76sources:
 77  maplet_WorldCountry:
 78    image:
 79      transparent_color: '#ffffff'
 80      transparent_color_tolerance: 0
 81    req:
 82      layers: lyr_WorldCountry
 83      url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
 84    type: wms
 85  maplet_WorldRailway:
 86    image:
 87      transparent_color: '#ffffff'
 88      transparent_color_tolerance: 0
 89    req:
 90      layers: lyr_WorldRailway
 91      url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
 92    type: wms
 93  maplet_WorldRiver:
 94    image:
 95      transparent_color: '#ffffff'
 96      transparent_color_tolerance: 0
 97    req:
 98      layers: lyr_WorldRiver
 99      url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
100    type: wms
101  maplet_WorldRoad:
102    image:
103      transparent_color: '#ffffff'
104      transparent_color_tolerance: 0
105    req:
106      layers: lyr_WorldRoad
107      url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
108    type: wms
109  osm_wms:
110    req:
111      layers: osm
112      url: http://osm.omniscale.net/proxy/service?
113    type: wms