[MapProxy] Reproject TMS layer on the fly
Oliver Tonnhofer
olt at omniscale.de
Fri Mar 11 07:10:35 EST 2011
On 11.03.2011, at 12:58, Fabrellas Bertran, Isabel wrote:
> Hi,
>
> I have a Mapproxy TMS layer, with name "topo4326_tms", that requests data from Tilecache, and it's cached.
>
> Its grid configuration in mapproxy.yaml is:
> tile_size: [512, 512]
> srs: 'EPSG:4326'
> bbox: [0.0,39.375,5.625,45.0]
> bbox_srs: 'EPSG:4326'
> res: [0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625, 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125, 0.000021457672119140625, 0.000010728836059570312]
>
> How can I access it from Openlayers with EPSG:23031?
>
> I have tried, with no success:
>
> var layer4 = new OpenLayers.Layer.TMS('MapProxy TMS topo4326 a',
> 'http://localhost:8080/tms/',
> {layername: 'topo4326_tms', type: 'png',
> tileSize: new OpenLayers.Size(512, 512),isBaseLayer: false, visibility: true });
> map.addLayer(layer4);
>
> var layer5 = new OpenLayers.Layer.TMS('MapProxy TMS topo4326 b',
> 'http://localhost:8080/tms/',
> {layername: 'topo4326_tms/EPSG23031', type: 'png',
> tileSize: new OpenLayers.Size(512, 512),isBaseLayer: false, visibility: true});
> map.addLayer(layer5);
>
> var layer6 = new OpenLayers.Layer.TMS('MapProxy TMS topo4326 c',
> 'http://localhost:8080/tms/',
> {layername: 'topo4326_tms_EPSG23031', type: 'png',
> tileSize: new OpenLayers.Size(512, 512),isBaseLayer: false, visibility: true});
> map.addLayer(layer6);
>
That depends on the rest of your configuration. But it should be layername_EPSG900913.
Look at the demo service (http://localhost:8080/demo/) for an OpenLayers example.
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