[OpenLayers-Users] [newbie] Different projections, Mapserver as WMS
Cranio
cranio at quipo.it
Fri Jan 11 10:30:59 EST 2008
Hi you all! I'm an absolute beginner so I hope that you'll have some
patience.
What I am trying to do is to have two layers on an Openlayers map.
The FIRST layer is the OpenLayers WMS that we can found in many examples.
I believe it relies on a "EPSG:4326" projection, right?
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
Then, the SECOND layer is a MapServer layer that uses "EPSG:26592" that I
define this way:
var my_wms = new OpenLayers.Layer.WMS( "Apulia",
"http://my.domain.net/cgi-bin/mapserv?map=/var/www/path-to-mapfile/mymapfile.map",
{layers: "comuni", transparent: "true", format: "image/png" });
But it doesn't work... If I change the projection of the map defining the
map as:
var map = new OpenLayers.Map('map',{projection:"EPSG:26592"});
the 2nd layers gives no error but the bounds are totally wrong, and i lose
1st layer.
If i leave the default proj for map, EPSG:4326, the 1st layer works but
the 2nd gives me an error (SRS).
Any help will be appreciated! Please lemme know if you need some more info
(f.ex. the MapServer mapfile or things like that).
--
View this message in context: http://www.nabble.com/-newbie--Different-projections%2C-Mapserver-as-WMS-tp14757400p14757400.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list