June 2005
Beginner to intermediate
372 pages
10h 1m
English
This section includes the complete listing of map files (Examples 12-13 through 12-16) used in this chapter.
Additions to the files are highlighted. Lines to be removed are
commented out by the preceding #
symbols.
Example 12-13. The global_mosaic WMS layer added to the global.map file
MAP SIZE 600 300 EXTENT -180 -90 180 90 IMAGECOLOR 180 180 250IMAGETYPE PNG24UNITS DD WEB TEMPLATE global.html IMAGEPATH "/srv/www/htdocs/tmp/" IMAGEURL "/tmp/" ENDLAYER NAME global_landsat TYPE RASTER STATUS DEFAULT CONNECTIONTYPE WMS CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" MINSCALE 20000 METADATA "wms_server_version" "1.1.1" "wms_srs" "EPSG:4326" "wms_format" "image/jpeg" "wms_styles" "" "wms_name" "modis,global_mosaic" END ENDLAYER NAME countries TYPE POLYGON STATUS DEFAULT DATA countries_simpl LABELITEM 'NAME' LABELMAXSCALE 50000000 CLASSITEM 'NAME' CLASS NAME 'Bulgaria' EXPRESSION 'Bulgaria' STYLE OUTLINECOLOR 100 100 100#COLOR 255 255 150END LABEL SIZE LARGE END END CLASS NAME 'All Countries' EXPRESSION ('[NAME]' ne 'Bulgaria') STYLE OUTLINECOLOR 100 100 100#COLOR 200 200 200END END END END
Example 12-14. Enabling a map file to serve up a layer using WMS
MAP
SIZE 600 300
EXTENT -180 -90 180 90
IMAGECOLOR 180 180 250
IMAGETYPE PNG24
UNITS DD
WEB
TEMPLATE global.html
IMAGEPATH "/srv/www/htdocs/tmp/"
IMAGEURL "/tmp/"
METADATA
"wms_title" "My Global Map WMS Server"
"wms_srs" "EPSG:4326"
END
END
LAYER
NAME countries
TYPE POLYGON
STATUS ON
DATA countries_simpl
MINSCALE ...