AW: [OpenLayers-Users] What's wrong with my OSM + MapServerlayers?

Arnd Wippermann arnd.wippermann at web.de
Thu Feb 9 12:47:07 EST 2012


Hi,

I doesn't also see your text. It seems to be an issue with nabble.com.


You should try to use a OpenLayers.Layer.WMS instead of
OpenLayers.Layer.MapServer. I'm not sure, how OpenLayers handles the
projection with Layer.MapServer.

layerWMS = OpenLayers.Layer.WMS("Comuni",
 
"http://localhost/cgi-bin/mapserv?map=/home/andrea/Documenti/wgs84.map",
         //WMS Params
         {  format:"image/png",
            transparent:true,
            layers:"Comuni"
         },
         //options
         {  isBaseLayer:false
         }   
);         

Perhaps you have to set some things in your mapfile to get WMS working. But
it's easier to handle than the native MapServer CGI.

Arnd



-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Andrea.Z
Gesendet: Donnerstag, 9. Februar 2012 16:26
An: openlayers-users at lists.osgeo.org
Betreff: Re: AW: [OpenLayers-Users] What's wrong with my OSM +
MapServerlayers?

Hi, I was posting my codes as raw text, I did not realize that you cannot
see it. If I post it in "normal" style, spaces are modified and it is hard
to read it. But I paste it anyway.

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    
    

    
  </head>
  <body onload="init()">
    <div id="map"></div>
  </body>
</html>

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/What-s-wrong-with-my-OSM-MapServer-layer
s-tp4376400p4379849.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list