R: [OpenLayers-Users] OpenLayers and WMS (EPSG:3004)
Severini Cristiano
Cristiano.Severini at aceaspa.it
Tue Jun 28 11:36:38 EDT 2011
ok, so my WMS needs to expose data/images in EPSG:900913, right?
-----Messaggio originale-----
Da: Bart van den Eijnden [mailto:bartvde at osgis.nl]
Inviato: mar 28/06/2011 15.49
A: Severini Cristiano
Cc: openlayers-users at lists.osgeo.org
Oggetto: Re: [OpenLayers-Users] OpenLayers and WMS (EPSG:3004)
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/12fd1233/attachment-0001.html
More information about the Users
mailing list