How can i display two layers with diferent projections at once? For example i have layer with EPSG:70076 and OSM layer.
|
|
To add two raster layer on the same map like you say in the previous link:
OSM by default is EPSG:900913 while for a WMS layer you can use any projection the WMS server accepts, so ensure the server accepts the projection you are requesting. Maybe not necessary to say but remember you can't have a map with a layer in a projection A and a second layer with a projection B. Cheers. |
|||||||
|
|
Generally, if you have WMS with different projections, you need to deal with this at the server level. Reprojecting tiles on the client will be slow, and unless they have similar projection properties, will probably look awful too (as reprojection usually involves resampling and rotation). If you control the generation of the tiles on the server, then you can reproject at source to a common projection, such as 900913 (geoserver does this, for example). If you want to reproject vectors, as distinct from rasters, then you can do this client side, but you will probably need to add the proj4js library, as openlayers only natively supports 900913 and 4326. See the example here: http://openlayers.org/dev/examples/using-proj4js.html Also, see the userguide on the proj4js page to see how it is done. http://trac.osgeo.org/ proj4js/ |
|||
|
|