[OpenLayers-Users] OpenLayers and WMS (EPSG:3004)
Bart van den Eijnden
bartvde at osgis.nl
Tue Jun 28 09:49:19 EDT 2011
Hi,
OpenLayers can not reproject images.
So you need to use the Google Mercator projection for your WMS layer, so that your WMS reprojects instead.
Best regards,
Bart
--
Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html
Bart van den Eijnden
OSGIS
bartvde at osgis.nl
On Jun 28, 2011, at 3:32 PM, Severini Cristiano wrote:
> Hi,
> i’m trying to overlay my own WMS service on Google/OpenStreetMap but i’m getting problems.
> I set EPSG:3004 with Proj4js and works (I can see correct mouse’s coords)
>
> var options = {
> controls:[],
> projection: new OpenLayers.Projection("EPSG:900913"),
> displayProjection: new OpenLayers.Projection("EPSG:3004")
> };
> map = new OpenLayers.Map('map', options);
>
> osm = new OpenLayers.Layer.OSM("Open Street Map");
> map.addLayer(osm);
>
> lines = new OpenLayers.Layer.WMS("MY LAYER",
> "http://myserver/wms/service.asp",
> {
> layers: 'lines',
> transparent: 'true'
> },
> {
> singleTile: true,
> units: 'meters',
> projection: new OpenLayers.Projection("EPSG:3004"),
> }
> );
> map.addLayer(lines);
>
> My lines are displayed over Greece.
> I guess the issue is on the request. The requests is done with SRS and BBOX in EPSG:900913
>
> Any solution?
> TIA
>
> crino
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110628/9528c2e2/attachment.html
More information about the Users
mailing list