msDrawMap(): Image handling error. Failed to draw layer named 'states_poly'. msShapefileOpen(): Unable to access file. (F:\OpenServer\domains\analytics.geo\cgi-bin/.\County.shp) msShapefileOpen(): Unable to access file. (F:\OpenServer\domains\analytics.geo\cgi-bin/.\shps/County.shp)
Map-файл:
Код: Выделить всё
MAP
NAME "WMS"
STATUS ON
IMAGETYPE PNG
EXTENT -180 -90 180 90
SIZE 400 300
#SHAPEPATH "F:\OpenServer\domains\analytics.geo\cgi-bin\shps" - не работает!
#SHAPEPATH "http://analytics.geo/cgi-bin/shps" - не работает!
SHAPEPATH "shps"
UNITS METERS
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
wms_title "My Demo"
wms_abstract "This is the WMS demo"
wms_onlineresource "http://analytics.geo/cgi-bin/mapserv.exe?map=world.map&"
wms_srs "EPSG:4326"
wms_getfeatureinfo "http://analytics.geo/cgi-bin/mapserv.exe?map=world.map&"
wms_featureinfoformat "text/plain"
wms_enable_request "GetMap GetFeatureInfo"
END
END
PROJECTION
"proj=latlong"
"ellps=WGS84"
"datum=WGS84"
END
LAYER # States polygon layer begins here
NAME states_poly
DATA County.shp
STATUS ON
TYPE POLYGON
TEMPLATE "simple"
CLASSITEM "CLASS"
PROJECTION
"proj=latlong"
"ellps=WGS84"
"datum=WGS84"
END
CLASS
NAME "States"
EXPRESSION "land" # Only polygons where "CLASS" = "land" will be drawn.
STYLE
COLOR 232 232 232
END
END
CLASS
NAME "Water"
EXPRESSION "water" # Only polygons where "CLASS" = "water" will be drawn.
STYLE
COLOR 198 198 255
END
END
METADATA
wms_title "Countries 1"
wms_abstract "Countries 1 test"
wms_srs "EPSG:4326"
wms_include_items "all"
END
END
END