<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Hello list</div>
<div><br>
</div>
<div>Wondering if anyone can help…</div>
<div><br>
</div>
<div>We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the
only difference in the LAYERs being MAX & MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales.</div>
<div><br>
</div>
<div>
<div> LAYER</div>
<div> NAME 'lri_luc_main_gen_500k'</div>
<div> GROUP 'lri_luc_main'</div>
<div> DATA 'the_geom_gen_500k FROM "data"."lri" USING UNIQUE gid USING srid=2193'</div>
<div> INCLUDE 'includes/lri_luc_main_layer.inc'</div>
<div> MINSCALEDENOM 251001</div>
<div> END</div>
<div> LAYER</div>
<div> NAME 'lri_luc_main_full'</div>
<div> GROUP 'lri_luc_main'</div>
<div> DATA 'the_geom FROM "data"."lri" USING UNIQUE gid USING srid=2193'</div>
<div> INCLUDE 'includes/lri_luc_main_layer.inc'</div>
<div> MAXSCALEDENOM 251000</div>
<div> MINSCALEDENOM 15000</div>
<div> END</div>
</div>
<div><br>
</div>
<div>The request for the legend icon is of the form:</div>
<div><br>
</div>
<div><a href="http://<servername>/cgi-bin/mapserv.fcgi?FORMAT=image/gif&MAP=lri.map&MODE=legendicon&ICON=lri_luc_main,1">http://<servername>/cgi-bin/mapserv.fcgi?FORMAT=image/gif&MAP=lri.map&MODE=legendicon&ICON=lri_luc_main,1</a></div>
<div><br>
</div>
<div>This worked fine before we started using GROUPs, however now we now encounter the error:</div>
<div><br>
</div>
<div>mapserv(): Web application error. Icon layer=lri_luc_main not found in map file.</div>
<div><br>
</div>
<div>Does the legendicon mode work with GROUP layers? </div>
<div>If not, is there a way round this? </div>
<div><br>
</div>
<div>Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs?</div>
<div><br>
</div>
<div>Any help or suggestions much appreciated. </div>
<div><br>
</div>
<div>Many thanks</div>
<div><br>
</div>
<div>Andrew</div>
<br>
<hr>
<font face="Arial" color="Green" size="1">Please consider the environment before printing this email<br>
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.<br>
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz<br>
</font>
</body>
</html>