<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19120">
</head>
<body style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">It is also possible to create a mask layer&nbsp;with&nbsp;REQUIRES keywork.&nbsp; The snippet below will&nbsp;make the &quot;mask&quot; layer to draw always when the &quot;countries&quot; layer
 is drawn.&nbsp;However, it is not automatically drawn if you ask for any other layer. One minory drawback is that the mask layer is also listed in the GetCapabilities as a normal WMS layer.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">LAYER</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">NAME &quot;mask&quot;</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">....</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">&nbsp;REQUIRES &quot;[countries]&quot;</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">...</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">END</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011"></span></font>&nbsp;</div>
<div dir="ltr" align="left"><font color="#0000ff" size="2" face="Arial"><span class="787493008-18102011">-Jukka Rahkonen-</span></font></div>
<font color="#0000ff" size="2" face="Arial"></font><br>
<blockquote style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" dir="ltr">
<div dir="ltr" lang="fi" class="OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>Lähettäjä:</b> mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>Puolesta </b>John Cartwright<br>
<b>Lähetetty:</b> 17. lokakuuta 2011 8:33<br>
<b>Vastaanottaja:</b> Matt McClelland<br>
<b>Kopio:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> Re: [mapserver-users] WMS GetMap request - incorrect layer ordering<br>
</font><br>
</div>
<div></div>
Thanks for your reply Matt. &nbsp;The GROUP idea works and, if I name the GROUP the same as the layer I'm attempting to mask, seems to prevent the unmasked layers from displaying. &nbsp;However, since it appears that a layer can only be in one GROUP, this means that
 I have to duplicate my inline mask layer for each image layer I'm attempting to mask.
<div><br>
</div>
<div>--john</div>
<div><br>
<div>
<div>On Oct 16, 2011, at 5:18 PM, Matt McClelland wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">My understanding is that the order you list the WMS layers is the order in which they will be layed down<br>
<br>
Try adding <br>
&nbsp;&nbsp; GROUP &quot;default&quot;<br>
to the layers you want displayed <br>
<br>
then use &amp;layers=default in you WMS call.<br>
<br>
Hope that helps.<br>
<br clear="all">
Matt&nbsp; :)<br>
<br>
On Mon, Oct 17, 2011 at 7:28 AM, Rahkonen Jukka <span dir="ltr">&lt;<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>&gt;</span> wrote:<br>
<div class="gmail_quote">
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
Hi,<br>
<br>
Somehow I feel that using STATUS DEFAULT layers with WMS is against the idea of the standard which has obviously been that user gets exactly those layers which are ordered from the service with &amp;layers=. &nbsp; Configuring server to always send some layers may be
 useful sometimes but righ now I cannot imagine when. Can you give a few examples?<br>
<font color="#888888"><br>
-Jukka Rahkonen-<br>
</font>
<div>
<div></div>
<div class="h5"><br>
John Cartwright wrote:<br>
<br>
&nbsp;&gt; Thanks for your reply Jukka. &nbsp;The reason for the single layer in the WMS request is that the other layer has a<br>
&nbsp;&gt; &quot;STATUS default&quot; which I understood to mean that it was always returned regardless of the value in the WMS<br>
&nbsp;&gt; layers parameter. &nbsp;Indeed this has been my experience, &nbsp;problem is that the default layer is always at the<br>
&nbsp;&gt; bottom of the draw order.<br>
<br>
--john<br>
<br>
On Oct 15, 2011, at 10:54 AM, Rahkonen Jukka wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; 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<br>
&gt; Compare this one with toilets first in the request<br>
&gt; <a href="http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;WIDTH=459&amp;HEIGHT=353&amp;LAYERS=POI_toilet%2Cdefault&amp;TRANSPARENT=TRUE&amp;FORMAT=image%2Fpng&amp;BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&amp;SRS=EPSG:3067&amp;STYLES=" target="_blank">
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;WIDTH=459&amp;HEIGHT=353&amp;LAYERS=POI_toilet%2Cdefault&amp;TRANSPARENT=TRUE&amp;FORMAT=image%2Fpng&amp;BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&amp;SRS=EPSG:3067&amp;STYLES=</a><br>
&gt; and this with toilets last<br>
&gt; <a href="http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;WIDTH=459&amp;HEIGHT=353&amp;LAYERS=default%2CPOI_toilet&amp;TRANSPARENT=TRUE&amp;FORMAT=image%2Fpng&amp;BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&amp;SRS=EPSG:3067&amp;STYLES=" target="_blank">
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&amp;REQUEST=GetMap&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;WIDTH=459&amp;HEIGHT=353&amp;LAYERS=default%2CPOI_toilet&amp;TRANSPARENT=TRUE&amp;FORMAT=image%2Fpng&amp;BBOX=436293.7193914731,6903411.337404243,436601.3555717845,6903647.929063611&amp;SRS=EPSG:3067&amp;STYLES=</a><br>
&gt;<br>
&gt; -Jukka Rahkonen-<br>
&gt; ________________________________________<br>
&gt; Lähettäjä: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] k&amp;#228;ytt&amp;#228;j&amp;#228;n John Cartwright
 [<a href="mailto:john.c.cartwright@comcast.net">john.c.cartwright@comcast.net</a>] puolesta<br>
&gt; Lähetetty: 15. lokakuuta 2011 19:02<br>
&gt; Vastaanottaja: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; Aihe: [mapserver-users] WMS GetMap request - incorrect layer ordering<br>
&gt;<br>
&gt; Hello All,<br>
&gt;<br>
&gt; I'm finding a difference between the image produced by shp2img and a WMS GetMap request. &nbsp;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. &nbsp;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.<br>
&gt;<br>
&gt; Here's a representative WMS request:<br>
&gt;<br>
&gt; <a href="http://localhost/cgi-bin/basicworld?request=getmap&amp;service=wms&amp;width=500&amp;height=250&amp;bbox=-180,-90,180,90&amp;srs=EPSG:4326&amp;version=1.1.1&amp;layers=countries&amp;format=png" target="_blank">
http://localhost/cgi-bin/basicworld?request=getmap&amp;service=wms&amp;width=500&amp;height=250&amp;bbox=-180,-90,180,90&amp;srs=EPSG:4326&amp;version=1.1.1&amp;layers=countries&amp;format=png</a><br>
&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; I'm using mapserver version 6.0.1 and I've tried various versions of WMS. &nbsp;Can someone please examine the map file below and point out what I'm doing wrong?<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; --john<br>
&gt;<br>
&gt;<br>
&gt; MAP<br>
&gt; &nbsp; NAME basicworld<br>
&gt; &nbsp; SIZE 720 360<br>
&gt; &nbsp; EXTENT -180 -90 180 90<br>
&gt; &nbsp; UNITS DD<br>
&gt; &nbsp; SHAPEPATH &quot;/Users/jcc/shapefiles&quot;<br>
&gt; &nbsp; IMAGETYPE PNG<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;WEB<br>
&gt; &nbsp; &nbsp; &nbsp;IMAGEPATH &quot;/Library/WebServer/Documents/output&quot;<br>
&gt; &nbsp; &nbsp; &nbsp;IMAGEURL &quot;/output/&quot;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;METADATA<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;ows_title&quot; &quot;BasicWorld Server&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;ows_onlineresource&quot; &quot;<a href="http://localhost/cgi-bin/basicworld" target="_blank">http://localhost/cgi-bin/basicworld</a>?&quot; &nbsp; ##required<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;ows_srs&quot; &quot;EPSG:4326&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;ows_onlineresource&quot; &nbsp; &quot;<a href="http://localhost/cgi-bin/basicworld" target="_blank">http://localhost/cgi-bin/basicworld</a>?&quot; &nbsp;## Recommended<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&quot;ows_enable_request&quot; &quot;*&quot;<br>
&gt; &nbsp; &nbsp; &nbsp;END<br>
&gt; &nbsp; END<br>
&gt;<br>
&gt; &nbsp; PROJECTION<br>
&gt; &nbsp; &nbsp; &nbsp;&quot;init=epsg:4326&quot; &nbsp; ##required<br>
&gt; &nbsp; END<br>
&gt;<br>
&gt; &nbsp; SYMBOL<br>
&gt; &nbsp; &nbsp; &nbsp;NAME 'circle'<br>
&gt; &nbsp; &nbsp; &nbsp;TYPE ELLIPSE<br>
&gt; &nbsp; &nbsp; &nbsp;POINTS 1 1 END<br>
&gt; &nbsp; &nbsp; &nbsp;FILLED TRUE<br>
&gt; &nbsp; END<br>
&gt;<br>
&gt; LAYER<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;NAME countries<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;TYPE POLYGON<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;STATUS on<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;DATA &quot;country&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;CLASS<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OUTLINECOLOR 0 0 0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR 167 167 167<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;END<br>
&gt; END &nbsp;# layer<br>
&gt;<br>
&gt; LAYER<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;NAME cities<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;TYPE POINT<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;STATUS default<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;DATA &quot;cities&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;CLASS<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SYMBOL 'circle'<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SIZE 6<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR 204 153 255<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;END<br>
&gt; END &nbsp;# layer<br>
&gt;<br>
&gt; END # Map File_______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">
http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>