[mapserver-users] WMS GetMap request - incorrect layer ordering
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Sat Oct 15 09:54:48 PDT 2011
Hi,
You had only one layer in your WMS request but I suppose it was just an accident. Layers in WMS request should be respected so that the first layer goes to the bottom and next ones above it. Order in the mapfile should not matter. I can't say about your installation but it seems to behave correctly for me with Mapserver 6.0
Compare this one with toilets first in the request
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=353&LAYERS=POI_toilet%2Cdefault&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&SRS=EPSG:3067&STYLES=
and this with toilets last
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=353&LAYERS=default%2CPOI_toilet&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&SRS=EPSG:3067&STYLES=
-Jukka Rahkonen-
________________________________________
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän John Cartwright [john.c.cartwright at comcast.net] puolesta
Lähetetty: 15. lokakuuta 2011 19:02
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] WMS GetMap request - incorrect layer ordering
Hello All,
I'm finding a difference between the image produced by shp2img and a WMS GetMap request. The image produced by shp2img looks as I expect honoring the order in which LAYERS are defined in the map file and the STATUS value. However, the WMS request does not seem to respect the order of the LAYERs, always drawing the polygons first regardless of the order defined in the map file or that of the WMS LAYERS request parameter.
Here's a representative WMS request:
http://localhost/cgi-bin/basicworld?request=getmap&service=wms&width=500&height=250&bbox=-180,-90,180,90&srs=EPSG:4326&version=1.1.1&layers=countries&format=png
Both the cities and countries layers display as you'd expect, but the countries draw on top of the cities contrary to what I'd expect and different that in the shp2img output.
I'm using mapserver version 6.0.1 and I've tried various versions of WMS. Can someone please examine the map file below and point out what I'm doing wrong?
Thanks!
--john
MAP
NAME basicworld
SIZE 720 360
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "/Users/jcc/shapefiles"
IMAGETYPE PNG
WEB
IMAGEPATH "/Library/WebServer/Documents/output"
IMAGEURL "/output/"
METADATA
"ows_title" "BasicWorld Server"
"ows_onlineresource" "http://localhost/cgi-bin/basicworld?" ##required
"ows_srs" "EPSG:4326"
"ows_onlineresource" "http://localhost/cgi-bin/basicworld?" ## Recommended
"ows_enable_request" "*"
END
END
PROJECTION
"init=epsg:4326" ##required
END
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
LAYER
NAME countries
TYPE POLYGON
STATUS on
DATA "country"
CLASS
OUTLINECOLOR 0 0 0
COLOR 167 167 167
END
END # layer
LAYER
NAME cities
TYPE POINT
STATUS default
DATA "cities"
CLASS
SYMBOL 'circle'
SIZE 6
COLOR 204 153 255
END
END # layer
END # Map File_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list