[mapserver-users] HELLLPPP!!!!

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Fri Apr 6 00:01:24 EDT 2012


Hi,

First thing is probably that QGis does not make valid mapfiles for Mapserver version 6.0.  Start with simple hand written mapfiles following the examples with Mapserver documentation. And do not start testing the mapfiles with OpenLayers. Use shp2img and browser with hand written WMS GetMap requests first so the control is in your hands.

-Jukka Rahkonen-

________________________________
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Özgür Arslan [ozgurarslan81 at hotmail.com] puolesta
Lähetetty: 6. huhtikuuta 2012 5:38
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] HELLLPPP!!!!

Hi All

I have a map file called QGISMap.map I am trying to make it appear in a frame that created by using open layers. But when I run the page it only shows a empty frame. Why it doesn't show the map? Can someone help me please? Codes are below:
  <!-- MapServer Template -->
 <!DOCTYPE html>
<html>
  <head>
    <title>OpenLayers Tutorial - Basic Map Setup</title>
    <script src="http://openlayers.org/dev/lib/OpenLayers.js"></script>
    <script type="text/javascript">

    var map, layer;

function init(){
    map = new OpenLayers.Map( 'map' );
    layer = new OpenLayers.Layer.MapServer("OpenLayers WMS",
       "http://localhost/cgi-bin/mapserv.exe", {map: 'C:/wwwroot/QGISMap/QGISMap.map'} );
    map.addLayer([wms]);
    map.zoomToMaxExtent();



    </script>

    <style>
    @media screen
    {
        #map{width: 500px; height:500px; border: 2px solid black;}
    }
    </style>
  </head>
  <body onload="init()">
    <h3>OpenLayers Tutorial - Basic Map Setup</h3>
    <div id="map"></div>
  </body>
</html>


More information about the mapserver-users mailing list