[MapProxy] Problems configuring MapProxy to serve WMS layer

Jorge Arévalo jorge.arevalo at deimos-space.com
Fri Nov 18 11:23:05 EST 2011


Thanks for the suggestion. Now I'm testing a different thing. I
actually have a mbtiles file, and I want to serve it using MapProxy
WMS service. I defined the layer and the cache like this:

  - name: my_mbtiles_layer
    title: MBTiles layer
    sources: [my_mbtiles_cache]

    sources: []
    grids: [GLOBAL_MERCATOR]
      type: mbtiles
      filename: /path/to/my/file.mbtiles

The mbtiles file does exist. It was created with mbutil, based on a
GeoTIFF file, and tested with sqlite3 client. It contains the tiles I
expect. But I get an empty OpenLayers map using default demo app from
MapProxy. This is an example of query:


Again, the BBOX looks strange. This time, I defined a grid for my
cache, like you said with my second example. But I can't see anything
in the map.

Another thing: if I change the path to my mbtiles file to a
non-existent one (/foo/bar/nonexist.mbtiles), the file is created
empty. I guess it's normal, because the cache must be created anyway.
Empty cache, because it has no sources at all. But in my first example
(with an existent mbtiles file, created with mbutil), why can't I see

Thanks again, and best regards,

2011/11/16 Oliver Tonnhofer <olt at omniscale.de>:
> Hi,
> the BBOX (-506.77734375,-266.8359375,370.01953125,190.1953125) _is_ in EPSG:4326. You are just a bit too far zoomed out and the OpenLayers demo client will request that BBOX without any clipping. MapProxy doesn't know the extent of the cascaded service with your first configuration and forwards the requested BBOX to Mapserver. The second configuration contains an extent from the GLOBAL_MERCATOR grid and MapProxy can clip the BBOX.
> You can get the first example to work if you add a coverage to your source: http://mapproxy.org/docs/latest/coverages.html
> Regards,
> Oliver
> On 15.11.2011, at 18:05, Jorge Arévalo wrote:
>> Hi,
>> Many thanks for the link. It helped me to solve my problem. The
>> 'supported_srs' option and a couple of things related with my network
>> configuration did the trick. I finally came with:
>> services:
>>  wms:
>>    srs: ['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
>>    image_formats: ['image/jpg', 'image/png']
>> layers:
>>  name: mylayer
>>  title: My layer
>>  sources: [my_cache]
>> caches:
>>  my_cache:
>>    grids: [GLOBAL_MERCATOR]
>>    sources: [my_wms_source]
>>    format: image/png
>>    request_format: image/png
>> sources:
>>   my_wms_source:
>>    type:wms
>>    req:
>>      url: http://ip_of_my_mapserver_machine/cgi-bin/mapserv?
>>      layers: mylayer_in_mapserver
>>      map: /path/to/my/mapfile.map
>>  supported_srs:['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
> --
> Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
> http://mapproxy.org | https://bitbucket.org/olt | @oltonn

Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com

More information about the MapProxy mailing list