MAP
NAME "Hbwms"
STATUS on
SIZE 800 600
EXTENT 107.795 28.559 116.977 33.627
UNITS METERS
Shapepath "Data/hubei"
Imagecolor 255 255 255
#FONTSET: /etc/fonts.txt
Web
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"Wms_title" "HB wms Server" # #required
"Wms_onlineresource" "Http://127.0.0.1:8800/cgi-bin/mapserv.exe?" # #required
"Wms_srs" "epsg:4326 epsg:42304 epsg:42101 epsg:4269" # #recommended
"Wms_enable_request" "*" # #necessary
END
END # Web
PROJECTION
"Init=epsg:4326" # #required
END
SYMBOL
NAME "Circle"
TYPE Ellipse
POINTS 1 1 END
END # Symbol
#
# Start of layer definitions
#
#province
LAYER
NAME "Prov"
METADATA
"Wms_title" "Prov" # #required
END
TYPE POLYGON
STATUS on
DATA "Prov"
PROJECTION
"Init=epsg:4326" # #recommended
END
CLASS
NAME "Prov"
STYLE
#COLOR 200 255 0
OUTLINECOLOR 120 120 120
LineCap Butt
PATTERN 8 END
WIDTH 1.0
END # Style
END # Class
END # Layer
#municipality
LAYER
NAME "municipality"
METADATA
"Wms_title" "municipality" # #required
END
TYPE POLYGON
STATUS on
DATA "municipality"
PROJECTION
"Init=epsg:4326" # #recommended
END
#FEATURE
# POINTS
# 5 35
# 25 40
# 45 40
# 35 35
# END # Points
#END # Feature
CLASS
NAME "municipality"
#STYLE
#COLOR 200 255 0
# OUTLINECOLOR 60 60 60
# WIDTH 1.0
#END # STYLE
STYLE
#COLOR 200 255 0
OUTLINECOLOR 100 100 100
WIDTH 0.5
LineCap Butt
PATTERN 8 END
END # STYLE
END # Class
END # Layer
#station
LAYER
NAME Station
METADATA
"Wms_title" "Station" # #required
END
TYPE Point
STATUS on
DATA "Station"
PROJECTION
"Init=epsg:4326" # #recommended
END
CLASS
NAME "Station"
STYLE
SYMBOL "Circle"
SIZE 5
COLOR 251 154 153
END # Style
END # Class
END # Layer
END # Map File
---------------------------------------------------------------------------------------------------------
http://127.0.0.1:8800/cgi-bin/mapserv.exe?map=d:/ms4w/apps/mapserv-demo/HuBei.map&SERVICE=WMS&VERSION= 1.1.1&request=getcapabilities
http://127.0.0.1:8800/cgi-bin/mapserv.exe?map=d:/ms4w/apps/mapserv-demo/HuBei.map&SERVICE=WMS&VERSION= 1.1.1&request=getmap&layers=prov,municipality,station&styles=&srs=epsg:4326&bbox= 107.795,28.559,116.977,33.627&width=800&height=600&format=image/png
Mapfile Generating WMS