[OpenLayers-Users] different projection and units

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Jan 19 12:19:34 EST 2007


Hi Domenico,

OpenLayers does not support client-side reprojection (yet). There is 
some discussion about this in the e-mail archives.

What you could do, is have a server-side script (or Mapserver WMS) 
reproject the layers for you.

Best regards,
Bart

mimmo pasticcio schreef:
> Hi Bart,
> is nice solution,
> but if I want to switch between two layer in different projection (and
> units) what can i do?
> Domenico
>
> 2007/1/19, Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>:
>> What about your map object, did you specify the projection there as 
>> well?
>>
>> Example:
>>
>> map = new OpenLayers.Map( $('imgMapContainer'), { controls: [], 
>> 'projection': 'EPSG:28992', 'units':'m', 'maxExtent': new 
>> OpenLayers.Bounds(-80000, 300000, 370000, 615000) , 
>> 'maxResolution':'auto'});
>>
>> Best regards,
>> Bart
>>
>> dome febbo schreef:
>> > Hi list,
>> > I need to use a WMS service with a different projection than EPSG:4236
>> > but the parameters are ignored and query string contain SRS=EPSG:4236
>> > and BBOX are in degree units.
>> >
>> > This is code about problem:
>> >
>> > var test_OL = new OpenLayers.Layer.WMS( "Test_OL",
>> >
>> > "http://localhost/cgi-bin/mapserv.exe?map=C:/test1_wms.map",
>> >                             {layers: 'test1', projection:
>> > 'EPSG:54004', units:'m'});
>> > map.addLayer(test_OL);
>> >
>> > Why OL (2.2) ignore my request?
>> >
>> > Best Regards,
>> > Domenico
>> > _______________________________________________
>> > Users mailing list
>> > Users at openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>> >
>> >
>>
>>
>> -- 
>> Bart van den Eijnden
>> OSGIS, Open Source GIS
>> bartvde at osgis.nl
>> http://www.osgis.nl
>>
>>
>
>


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the Users mailing list