[mapserver-users] WMS LAYERS parameter - problems with the order

Daniel Degasperi daniel.degasperi at r3-gis.com
Wed Nov 30 03:38:55 EST 2011


Hi,
I have read the thread about STATUS DEFAULTand tried alreadywithSTATUS 
ON, but it's the same result as before.

I'm using following layer blocks:

LAYER
     GROUP "g_05"
     NAME "g_05.s2"
     TYPE POLYGON
     STATUS ON
     METADATA
         "wms_group_title" "g_05"
         "ows_title"    "polygon_layer"
     END
     PROJECTION
         "init=epsg:26591"
     END
     CONNECTIONTYPE POSTGIS
     CONNECTION "user=foo password=foo dbname=foo host=localhost port=5432"
     DATA "the_geom FROM (SELECT * FROM geo.s2_data) AS foo USING UNIQUE 
objectid USING SRID=26591"
     FILTER "code_ts = '05'"
     PROCESSING "CLOSE_CONNECTION=DEFER"
     DUMP TRUE
     SIZEUNITS pixels
     MAXSCALEDENOM 11000
     OPACITY 80
     POSTLABELCACHE TRUE
     CLASS
         NAME "polygon_class"
         TITLE "polygon_layer"
         STYLE
             COLOR 0 0 0
             OUTLINECOLOR 0 0 0
         END
     END
END

LAYER
     GROUP "g_play_label"
     NAME "g_play_label.play_label"
     TYPE POINT
     STATUS ON
     METADATA
         "wms_group_title" "g_play_label"
         "ows_title"    "point_layer"
     END
     PROJECTION
         "init=epsg:26591"
     END
     CONNECTIONTYPE POSTGIS
     CONNECTION "user=foo password=foo dbname=foo host=localhost port=5432"
     DATA "the_geom FROM (SELECT * FROM play.play) AS foo USING UNIQUE 
pl_id USING SRID=26591"
     FILTER "pl_date_end >= now() or pl_date_end is null"
     PROCESSING "CLOSE_CONNECTION=DEFER"
     DUMP TRUE
     SIZEUNITS pixels
     MAXSCALEDENOM 3000
     LABELITEM "pl_code"
     CLASS
         NAME "simple_label"
         TITLE "simple_label"
         EXPRESSION ([pc_id] eq 8)
         LABEL
             TYPE TRUETYPE
             PARTIALS TRUE
             FONT "dejavu-sans-bold"
             COLOR 255 150 0
             OUTLINECOLOR 80 0 0
             SIZE 8
             MINSIZE 8
             MAXSIZE 8
             POSITION UR
             FORCE TRUE
         OFFSET 5 0
         END
         STYLE
             COLOR 80 0 0
             SYMBOL "SQUARE"
             SIZE 8
             MINSIZE 8
             MAXSIZE 8
             ANGLE 45
             WIDTH 8
             MINWIDTH 8
         END
         STYLE
             COLOR 255 150 0
             SYMBOL "SQUARE"
             SIZE 6
             MINSIZE 6
             MAXSIZE 6
             ANGLE 45
             WIDTH 6
             MINWIDTH 6
         END
     END
     CLASS
         NAME "complex_label"
         TITLE "complex_label"
         LABEL
             TYPE TRUETYPE
             PARTIALS TRUE
             FONT "dejavu-sans-bold"
             COLOR 255 50 0
             OUTLINECOLOR 80 0 0
             SIZE 8
             MINSIZE 8
             MAXSIZE 8
             POSITION UR
             FORCE TRUE
         OFFSET 5 0
         END
         STYLE
             COLOR 80 0 0
             SYMBOL "SQUARE"
             SIZE 8
             MINSIZE 8
             MAXSIZE 8
             ANGLE 45
             WIDTH 8
             MINWIDTH 8
         END
         STYLE
             COLOR 255 150 0
             SYMBOL "SQUARE"
             SIZE 6
             MINSIZE 6
             MAXSIZE 6
             ANGLE 45
             WIDTH 6
             MINWIDTH 6
         END
     END
END

Daniel

Am 29/11/2011 22:02, schrieb Rahkonen Jukka:
> Hi,
>
> Both systems should work. First layer in the mapfile is rendered first so it goes on the bottom and the same should happen with WMS layers. A few weeks ago we learned that layers set to STATUS DEFAULT do not respect any other rules and they are always rendered first.  Do you have such ones? If yes, try turning them into STATUS ON.  If that does not have an effect please mail us the whole layer blocks for those two.
>
> You should be able to see that layer order does have an effect by sending the following GetMaps with a browser.
>
> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=659&HEIGHT=534&LAYERS=default,POI_pub_restaurant&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=227718.18080836372,7007391.918564562,229420.66496860533,7008771.473255865&SRS=EPSG:3067&STYLES=
>
> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=659&HEIGHT=534&LAYERS=POI_pub_restaurant,default&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=227718.18080836372,7007391.918564562,229420.66496860533,7008771.473255865&SRS=EPSG:3067&STYLES=
>
> -Jukka Rahkonen-
> ________________________________________
>   Daniel Degasperi wrote:
>
>
>> Hi,
>> I've tried several combinations of the order of my LAYERS in the WMS
> request.
>    - changed the order in LAYERS parameter
>    - changed the order in the mapfile
>
> but still, the polygon layer is drawn at the top of my map and the point
> layer at the bottom.
>
> I've tried the request with MapServer 5.6.7 and MapServer 6.0.1; WMS
> 1.1.1&  WMS 1.3.0.
>
> Requests:
> [1]
> /cgi-bin/mapserv6?map=map-ms6.map&EXCEPTIONS=inimage&FORMAT=image/png&TRANSPARENT=false&LAYERS=g_05.s2,g_play_label.play_label&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A26591&BBOX=1515109.311936,5033336.8146348,1515261.7333042,5033476.4274846&WIDTH=1428&HEIGHT=1308
>
> [2]
> /cgi-bin/mapserv6?map=map-ms6.map&EXCEPTIONS=inimage&FORMAT=image/png&TRANSPARENT=false&LAYERS=g_play_label.play_label,g_05.s2&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A26591&BBOX=1515109.311936,5033336.8146348,1515261.7333042,5033476.4274846&WIDTH=1428&HEIGHT=1308
>
> For each request I've got the same output, see screenshot.
>
> Am I doing something wrong?
>
> Best regards,
> Daniel
>
> --
> Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capabilities.xml
Type: text/xml
Size: 5918 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111130/6a2e1ce4/capabilities.xml


More information about the mapserver-users mailing list