[OpenLayers-Users] MapServer Layer vs. WMS Layer
Richard Greenwood
richard.greenwood at gmail.com
Tue Jun 26 08:49:14 EDT 2007
On 6/26/07, Jachym Cepicky <jachym.cepicky at gmail.com> wrote:
> Hallo,
>
> First of all: I try to add two same layers from one server, first as
> OpenLayer.Layer.MapServer and second as OpenLayers.Layer.WMS, but their
> projection appears different:
>
> var bnmapserv = new OpenLayers.Layer.MapServer.Untiled(
> "TopoHelp ČR (MapServer)",
> "http://www.bnhelp.cz/cgi-bin/crtopo", {layers:
> 'doprava kraje',transparent:true, map_imagetype:"gif",srs:"epsg:4326"},
> {buffer: 1, gutter: 0,isBaseLayer: false, opacity:
> 0.5});
>
> var bntopo = new OpenLayers.Layer.WMS(
> 'TopoHelp ČR (WMS)',"http://bnhelp.netart.cz/cgi-bin/crtopo",
> {layers: 'kraje,les,sidla,voda,doprava', format:
> 'image/png',transparent:true },
> {buffer: 1, gutter:0, visibility:false} );
>
> Resulting example is on
> http://www.bnhelp.cz/mapserv/pokusy/openlayers/digitalizace/
>
> How I'm supposed to set MapServer/OpenLayers so that both maps do appear
> in the same way?
>
> Second question is: how to get transparent OpenLayers.Layer.MapServer ?
In the MapServer map file, you need to set:
TRANSPARENT ON
or it can be passed to MapServer in the OpenLayer layer definition as
'map_transparent':'ON'
You may also need: {"isBaseLayer":false}
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the Users
mailing list