Difference between revisions of "Instalación y manejo de servicios WMS con UMN Mapserver y Openlayers"

From OSGeo
Jump to navigation Jump to search
(New page: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> <style type="text/css"> #map { ...)
 
Line 1: Line 1:
 
 
  <html xmlns="http://www.w3.org/1999/xhtml">
 
  <html xmlns="http://www.w3.org/1999/xhtml">
 
   <head>
 
   <head>
Line 17: Line 16:
 
         function init(){
 
         function init(){
 
             map = new OpenLayers.Map( 'map',{
 
             map = new OpenLayers.Map( 'map',{
maxExtent: new OpenLayers.Bounds(378107,5193120,510896,5320243),
+
maxExtent: new OpenLayers.Bounds(378107,5193120,510896,5320243),
maxResolution: 'auto',
+
maxResolution: 'auto',
units: "m",
+
units: "m",
projection: "EPSG:26915"}  
+
projection: "EPSG:26915"}  
);
+
);
 
              
 
              
 
             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
 
             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",

Revision as of 05:05, 8 September 2008

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
   <style type="text/css">
       #map {
           width: 512px;
           height: 512px;
           border: 1px solid black;
       }
   </style>
   <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
   <script type="text/javascript">
       
       var map, layer;

       function init(){
           map = new OpenLayers.Map( 'map',{
					maxExtent: new OpenLayers.Bounds(378107,5193120,510896,5320243),
					maxResolution: 'auto',
					units: "m",
					projection: "EPSG:26915"} 
				);
           
           layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                   "http://localhost:9000/cgi-bin/mapserv.exe?map=/ms4w/apps/mapserv-demo/itasca.map", {layers: 'drgs'} );
                   
           map.addLayers([layer]);

           map.zoomToMaxExtent();
           map.addControl( new OpenLayers.Control.LayerSwitcher() );
       }
   </script>
 </head>
 <body onload="init()">

      Ejemplo de WMS
 
        El uso basico de Openlayers con un layer WMS
       mas texto aquì
 </body>
</html>