MapProxy案例:多个图层

示例

http://webgis.cn:6002/

MapProxy 配置文件

01 caches:
02   maplet_WorldCountry:
03     grids:
04     - webmercator
05     sources:
06     - maplet_WorldCountry
07   maplet_WorldRailway:
08     grids:
09     - 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   osm_cache:
23     grids:
24     - webmercator
25     sources:
26     - osm_wms
27 globals: null
28 grids:
29   webmercator:
30     base: GLOBAL_WEBMERCATOR
31 layers:
32 - name: osm
33   sources:
34   - osm_cache
35   title: Omniscale OSM WMS - osm.omniscale.net
36 - name: maplet_WorldRailway
37   sources:
38   - maplet_WorldRailway
39   title: maplet_WorldRailway
40 - name: maplet_WorldRoad
41   sources:
42   - maplet_WorldRoad
43   title: maplet_WorldRoad
44 - name: maplet_WorldCountry
45   sources:
46   - maplet_WorldCountry
47   title: maplet_WorldCountry
48 - name: maplet_WorldRiver
49   sources:
50   - maplet_WorldRiver
51   title: maplet_WorldRiver
52 services:
53   demo: null
54   kml:
55     use_grid_names: true
56   tms:
57     origin: nw
58     use_grid_names: true
59   wms:
60     md:
61       abstract: This is a minimal MapProxy example.
62       title: MapProxy WMS Proxy
63   wmts: null
64 sources:
65   maplet_WorldCountry:
66     image:
67       transparent_color: '#ffffff'
68       transparent_color_tolerance: 0
69     req:
70       layers: lyr_WorldCountry
71       url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
72     type: wms
73   maplet_WorldRailway:
74     image:
75       transparent_color: '#ffffff'
76       transparent_color_tolerance: 0
77     req:
78       layers: lyr_WorldRailway
79       url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
80     type: wms
81   maplet_WorldRiver:
82     image:
83       transparent_color: '#ffffff'
84       transparent_color_tolerance: 0
85     req:
86       layers: lyr_WorldRiver
87       url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
88     type: wms
89   maplet_WorldRoad:
90     image:
91       transparent_color: '#ffffff'
92       transparent_color_tolerance: 0
93     req:
94       layers: lyr_WorldRoad
95       url: http://127.0.0.1/cgi-bin/mapserv?map=/gdata/mfile_world.map
96     type: wms
97   osm_wms:
98     req:
99       layers: osm
100       url: http://osm.omniscale.net/proxy/service?
101     type: wms