[mapserver-users] HELLLPPP!!!!

Özgür Arslan ozgurarslan81 at hotmail.com
Thu Apr 5 22:38:30 EDT 2012





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>

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120406/d3d0dca0/attachment.html


More information about the mapserver-users mailing list