[mapserver-users] WMS service problem with mapserver mapfile layer classes
gorank
kirandziskig at gmail.com
Tue Jun 2 13:33:23 PDT 2015
Thanks Jeff, part of the mapfile for particular layer is as follow. It shows
municipalities in few classes with differrent criteria for attribute YEAR
that is chosen from dropdown list in openlayers
LAYER
DATA "NAS001.shp"
EXTENT 7407523.716202 4519137.450122 7716943.221608 4697261.550122
LABELITEM "OPT"
LABELMAXSCALEDENOM 443652
METADATA
"wms_srs" "EPSG:3909 EPSG:4326 EPSG:900913 EPSG:6316"
"wms_onlineresource"
"http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&"
"wms_enable_request" "*"
"wms_feature_info_mime_type" "text/html"
"coordsys_name" "EPSG:3909 - MGI 1901 / Balkans zone 7"
"wms_title" "Opstini"
END # METADATA
NAME "Opstini"
PROJECTION
"init=epsg:3909"
END # PROJECTION
STATUS ON
TEMPLATE "query"
TILEITEM "location"
TYPE POLYGON
UNITS METERS
VALIDATION
"godina" "^[12][09][0-9][0-9]$" #THIS IS RUNTIME SUBSTITION
PARAMETER IT MEANS "YEAR"
END # VALIDATION
CLASS
NAME "klasa_1"
EXPRESSION ([%godina%] > 0 and [%godina%] < 5)
LABEL
FONT "arial"
SIZE 8
ENCODING "ISO-8859-5"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 255 255 128
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "4.9 -у223"
END # CLASS
CLASS
NAME "klasa_2"
EXPRESSION ([%godina%] >= 5 and [%godina%] < 10)
LABEL
FONT "arial"
SIZE 8
ENCODING "CP1251"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 250 209 85
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "5.0 - 9.9 -"
END # CLASS
CLASS
NAME "klasa_3"
EXPRESSION ([%godina%] >=10 and [%godina%] < 15)
LABEL
FONT "arial"
SIZE 8
ENCODING "CP1251"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 242 167 46
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "10.0 - 14.9 -"
END # CLASS
CLASS
NAME "klasa_4"
EXPRESSION ([%godina%] >= 15 and [%godina%] < 20)
LABEL
FONT "arial"
SIZE 8
ENCODING "CP1251"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 173 83 19
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "15.0 - 19.9 - 5"
END # CLASS
CLASS
NAME "klasa_5"
EXPRESSION ([%godina%] >= 20 and [%godina%] < 10000)
LABEL
FONT "arial"
SIZE 8
ENCODING "CP1251"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 107 0 0
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "20 и повеќе"
END # CLASS
CLASS
NAME "klasa_0"
EXPRESSION ([%godina%] = 100000)
LABEL
FONT "arial"
SIZE 8
ENCODING "CP1251"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 100 100 100
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
TITLE "нема појава"
END # CLASS
CLASS
EXPRESSION ([%godina%] = 10000)
LABEL
FONT "arial"
SIZE 8
ENCODING "ISO-8859-5"
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 200 200 200
OUTLINECOLOR 130 130 130
WIDTH 0.5
END # STYLE
END # CLASS
END # LAYER
The Full URL
http://mapserver.stat.gov.mk/cgi-bin/GDZS/wms?map=/ms4w/apps/GDZS/NAS001_op.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:7269&FORMAT=image/png&LAYERS=Opstini%2CRegioni%2CDrzGran%2CEzera&GODINA=2009&BBOX=436350.358101,4509075,688350.358101,4698075&WIDTH=800&HEIGHT=600
shows the map in the browser.
Goran
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-service-problem-with-mapserver-mapfile-layer-classes-tp5208743p5208756.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list