[mapserver-users] MODE=legendicon & GROUP Layers

Andrew Cowie CowieA at landcareresearch.co.nz
Sat Sep 8 01:18:14 PDT 2012


Thanks for the info Steve, that makes sense - when Groups are used to link
related layers things get too ambiguous. We'll look at our options with
this one.

Cheers

Andrew



On 07/09/2012 17:22, "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us> wrote:

>Legend icon only works with layers. Groups are just too ambiguous to
>uniquely identify the class to be rendered. Groups don't have to be
>organized by scale ranges. Often they link related layers, for example  a
>bunch of road feature types. I think It would be possible to add support
>to see if a group name can resolve to a single layer based on scale but
>that doesn't exist in the code at this point.
>
>Steve
>________________________________________
>From: mapserver-users-bounces at lists.osgeo.org
>[mapserver-users-bounces at lists.osgeo.org] on behalf of Andrew Cowie
>[CowieA at landcareresearch.co.nz]
>Sent: Friday, September 07, 2012 10:46 AM
>To: mapserver-users at lists.osgeo.org
>Subject: [mapserver-users] MODE=legendicon & GROUP Layers
>
>Hello list
>
>Wondering if anyone can helpŠ
>
>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.
>
>        LAYER
>                NAME 'lri_luc_main_gen_500k'
>                GROUP 'lri_luc_main'
>                DATA 'the_geom_gen_500k FROM "data"."lri" USING UNIQUE
>gid USING srid=2193'
>                INCLUDE 'includes/lri_luc_main_layer.inc'
>                MINSCALEDENOM 251001
>        END
>        LAYER
>                NAME 'lri_luc_main_full'
>                GROUP 'lri_luc_main'
>                DATA 'the_geom FROM "data"."lri" USING UNIQUE gid USING
>srid=2193'
>                INCLUDE 'includes/lri_luc_main_layer.inc'
>                MAXSCALEDENOM 251000
>                MINSCALEDENOM 15000
>        END
>
>The request for the legend icon is of the form:
>
>http://<servername>/cgi-bin/mapserv.fcgi?FORMAT=image/gif&MAP=lri.map&MODE
>=legendicon&ICON=lri_luc_main,1
>
>This worked fine before we started using GROUPs, however now we now
>encounter the error:
>
>mapserv(): Web application error. Icon layer=lri_luc_main not found in
>map file.
>
>Does the legendicon mode work with GROUP layers?
>If not, is there a way round this?
>
>Or alternatively, perhaps there is a better way to request a generalised
>version of the geometry that doesn't involve GROUP LAYERs?
>
>Any help or suggestions much appreciated.
>
>Many thanks
>
>Andrew
>
>________________________________
>Please consider the environment before printing this email
>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.
>The views expressed in this email may not be those of Landcare Research
>New Zealand Limited. http://www.landcareresearch.co.nz
>


Please consider the environment before printing this email
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.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz


More information about the mapserver-users mailing list