[MapProxy] Grids configuration between OpenLayers and MapProxy

Javier Maestu javier.maestu at gmail.com
Fri Aug 2 06:05:50 PDT 2013


Dear all,

I'm new to the list, first of all, I would like to congratulate the team of
MapProxy. I think have several interesting features.

Just to use that feature, I want to ask for help because I have doubts
about
configuring MapProxy.

I'm working on a project based on OpenLayers, which makes requests WMS
(GetMap) according to a certain extent and some resolutions.

Below you have a sample definition:

*<script type="text/javascript">*
*    var map;*
*    function init(){*
*        OpenLayers.Util.onImageLoadErrorColor = "transparent";*
*        map = new OpenLayers.Map('map', {*
*  resolutions: [76.43702827, 38.21851414, 19.10925707, 9.554628534,
4.777314267,2.388657133, 1.194328567, 0.597164283, 0.298582142,
0.140047909, 0.084028745,0.028009582],*
*          maxExtent: new OpenLayers.Bounds(414222.0, 4567961.0, 434063.0,
4583763.0),*
*          projection: new OpenLayers.Projection("EPSG:23031")*
*        });*
*        var layer = new OpenLayers.Layer.WMS( "WMS SAMPLE",*
*            "http://192.168.0.152/mapproxy/service?",*
*            {layers: "**WMS SAMPLE**", format: "image/png",
srs:"EPSG:23031",*
*             exceptions: "application/vnd.ogc.se_inimage"},*
*            {singleTile: false, isBaseLayer: true} );*
*
*
*        map.addLayer(layer);*
* var centre=[424160,4576735]*
* //map.zoomTo(3);*
* map.setCenter(centre,2);*
*    }*
*</script>*

This extension is the same, exactly,  with the extension and resolutions
that are defined in the MapProxy (mapproxy.yaml). Below my grid
configuration:

*UTM31N:
    origin: 'nw'
    srs: 'EPSG:23031'
    bbox: [414222,4567961,434063,4583763]
    bbox_srs: 'EPSG:23031'
    res:
[76.437028270,38.218514140,19.109257070,9.554628534,4.777314267,2.388657133,1.194328567,0.597164283,0.298582142,0.140047909,0.084028745,0.028009582]
    #align_resolutions_with: GLOBAL_MERCATOR*

But if I see the images that are requested and the images cached in
MapProxy, I can see that the extensions are different, so the images are
different.

I want to avoid Mapproxy should render images together, I thought the same
extension and same resolutions mappropxy should generate some tiles are
exactly alike, but the result is not what I expected

I guess this makes more work to MapProxy (bonding, resampling ...)

My goal is that OL requests exactly match the MapProxy cache. Someone can
help me?

Also, just tell you that I prefer to use WMS service instead of WMTS or
similar. Is one of the requirements of the project.
All information would be welcome.
Thanks in advance,

javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130802/cc1184d4/attachment.html>


More information about the MapProxy mailing list