2.4. MapProxy案例:一个层

2.4.1. 示例

http://webgis.cn:6001/

2.4.2. MapProxy配置文件

 1caches:
 2  maplet_WorldCountry:
 3    grids:
 4    - webmercator
 5    sources:
 6    - maplet_WorldCountry
 7  osm_cache:
 8    grids:
 9    - webmercator
10    sources:
11    - osm_wms
12globals: null
13grids:
14  webmercator:
15    base: GLOBAL_WEBMERCATOR
16layers:
17- name: osm
18  sources:
19  - osm_cache
20  title: Omniscale OSM WMS - osm.omniscale.net
21- name: maplet_WorldCountry
22  sources:
23  - maplet_WorldCountry
24  title: maplet_WorldCountry
25services:
26  demo: null
27  kml:
28    use_grid_names: true
29  tms:
30    origin: nw
31    use_grid_names: true
32  wms:
33    md:
34      abstract: This is a minimal MapProxy example.
35      title: MapProxy WMS Proxy
36  wmts: null
37sources:
38  maplet_WorldCountry:
39    image:
40      transparent_color: '#ffffff'
41      transparent_color_tolerance: 0
42    req:
43      layers: lyr_WorldCountry
44      url: http://47.94.22.90/cgi-bin/mapserv?map=/gdata/mfile_world.map
45    type: wms
46  osm_wms:
47    req:
48      layers: osm
49      url: http://osm.omniscale.net/proxy/service?
50    type: wms