[MapProxy] configuring tiled WMS source

Oliver Tonnhofer tonnhofer at omniscale.de
Wed Mar 9 08:26:17 EST 2011


On 09.03.2011, at 09:39, Stephan Knauss wrote:
> I have played around a bit.
> 
> This is not working
> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&width=512&height=512&format=image/jpeg&version=1.1.1&styles=visual&bbox=-180,-166,76,90
> 
> while this works:
> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&width=512&height=512&bbox=-180,-166,76,90&format=image/jpeg&version=1.1.1&styles=visual
> 
> so the order of the parameters in the URL is important.
> If I insert the bbox of the failing query into the right position of the URL, it also works. So the grid is right, but the request string is not constructed right.
> 
> How can I specify the request string? All mapproxy would need to modify is the bbox parameter, the order of the remaining parameters should remain unchanged.


Ok, it's getting tricky. The order of the parameters is more or less random and there is no way to specify it somewhere, since it doesn't matter for real WMS services.

The only solution I see is to extend the existing tile source and add BBOX the the URL templates. Then you could configure the whole URL and let MapProxy insert the BBOX.

You would need to extend TileClient, TileURLTemplate. 
https://bitbucket.org/olt/mapproxy/src/da52afbba048/mapproxy/client/tile.py
The TileClient would also need access to the grid (assembled somewhere in mapproxy/config/loader.py)


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt





More information about the MapProxy mailing list