[Spanish] Re: mapserver, google maps y openlayers

martinmaximilianoflores martinmaximilianoflores at yahoo.com.ar
Mon Feb 27 14:34:52 EST 2012


mi map:

MAP
  
  NAME "wms_server_afis4"
  
  SIZE 700 700
  
  UNITS meters
  
  STATUS ON

  EXTENT 5596608.075442 6161290.075000 5623305.424558 6182013.925000
  
  FONTSET '/var/www/html/fontset.txt'
  
  SYMBOLSET '/var/www/html/symbols.sym'
  
  PROJECTION
     # 'init=epsg:22195'
     'init=epsg:900913' #PROYECCION PARA GOOGLE MAPS
  END
 
  #Para que mapserver entienda la proyecci￳n de Google se ha incluido esta
linea en el archivo /usr/share/proj/epsg: 
  #<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <>
  
  
  #IMAGECOLOR 255 255 255
  IMAGEQUALITY 80
  IMAGETYPE png
  #TRANSPARENT ON
  

  OUTPUTFORMAT
    NAME agg
    DRIVER 'AGG/PNG'
    MIMETYPE 'agg/png'
    IMAGEMODE RGBA
  END
  
  
  LEGEND
    IMAGECOLOR 255 255 255
    STATUS OFF
    KEYSIZE 18 12
    POSITION ur
    LABEL
      TYPE BITMAP
      SIZE medium
      COLOR 0 0 89
    END
  END

  WEB
    
    IMAGEPATH '/var/www/html/tmp/'

    IMAGEURL 'http://sshhost.dyndns-server.com/tmp/'
    
    TEMPLATE '/var/www/html/tmpl_file.html'  #para el modo "browse"
    

    # WMS server settings
    METADATA
      'wms_title'           'wms_server_afis4'
      'wms_name'            'wms_server_afis4'
      'wms_onlineresource' 
'http://sshhost.dyndns-server.com/cgi-bin/mapserv?map=/var/www/html/webtools/afis.map&'
      'wms_srs'             'EPSG:22195 EPSG:900913'
      'wms_enable_request'  '*'
      'wms_include_items' 'all'
      'gml_include_items' 'all'
      'wms_feature_info_mime_type' 'text/html' #para el popup de opnelayers
    END
	
	
	
    
  END
  
  

  LAYER
  
    NAME 'afis4ok'
    TYPE POLYGON
    DUMP true
     
    #EXTENT 5596608.075442 6161290.075000 5623305.424558 6182013.925000
    
    HEADER   '/var/www/html/webtools/header.html'
    TEMPLATE '/var/www/html/webtools/afis4.html'
    FOOTER   '/var/www/html/webtools/footer.html'
    
    
    METADATA
      'wms_title'  'afis4ok'
      'wms_name'   'afis4ok'
      #'wms_srs'    'EPSG:22195'
      'wms_srs'    'EPSG:22195 EPSG:900913'
      'wms_format' 'image/png'
      'wms_enable_request' '*'
      'wms_onlineresource' 
'http://sshhost.dyndns-server.com/cgi-bin/mapserv?map=/var/www/html/webtools/afis.map&'
      #'wms_extent'  '5596608.075442 6161290.075000 5623305.424558
6182013.925000'
      'wms_include_items' 'all'
      'gml_include_items' 'all'
      
    END
    
    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname='postgres' host=localhost port=5432 user='postgres'
password='voidpointer'"
    DATA "the_geom FROM afis4ok using unique gid using SRID=-1"
    
    STATUS ON
       
    TRANSPARENCY 85
    
  #PROJECTION
  #   'init=epsg:7124'
  #END
 
    
    #CLASS
    #   name 'NUMERO'
    #   STYLE
    #     WIDTH 0.91 
    #     OUTLINECOLOR 0 0 255
    #   END
    #END
    CLASSITEM 'REGION__ZO'
    LABELITEM "BARRIO"
    CLASS
      NAME 'Dato A'
      EXPRESSION ( ([REGION__ZO] >= 0.000) AND ([REGION__ZO] <= 6.000) )
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 0 255 0
       END
    END
    CLASS
      NAME 'Dato B'
      EXPRESSION ( ([REGION__ZO] >= 6.000) AND ([REGION__ZO] <= 12.000) )
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 0 203 52
       END
    END
    CLASS
      NAME 'Dato C'
      EXPRESSION ( ([REGION__ZO] >= 12.000) AND ([REGION__ZO] <= 18.000) )
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 0 152 103
       END
    END
    CLASS
      NAME 'Dato D'
      EXPRESSION ( ([REGION__ZO] >= 18.000) AND ([REGION__ZO] <= 24.000) )
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 0 101 154
       END
    END
    CLASS
      NAME 'Dato E'
      EXPRESSION ( ([REGION__ZO] >= 24.000) AND ([REGION__ZO] <= 30.000) )
       STYLE
         WIDTH 0.91 
         OUTLINECOLOR 0 0 0
         COLOR 0 50 205
       END
    END
  END
    
    
  END
  
  
 

END



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/mapserver-google-maps-y-openlayers-tp4515966p4516176.html
Sent from the OSGeo Spanish Local Chapter mailing list archive at Nabble.com.


More information about the Spanish mailing list