[mapserver-dev] RFC 101: Content Dependant Legend Rendering

Worth Lutz wal3 at mindspring.com
Fri Aug 23 06:04:40 PDT 2013


Thomas,

Thanks for your answer. I'm currently serving up the layers with a wms and
the color attribute is joined with the selected shapes in postgres. The
shapes are grouped by soil type and each group gets a sequential number
which is used to join with the color table. Colors for a particular soil
type can change between views thus the need for a legend. With greater than
60 types choosing distinct colors can be challenging. I may need to change
to mapscript to better serve this layer.

Thanks again,
Worth 


-----Original Message-----
From: thomas bonfort [mailto:thomas.bonfort at gmail.com] 
Sent: Friday, August 23, 2013 5:13 AM
To: Worth Lutz
Cc: MapServer Dev Mailing List
Subject: Re: [mapserver-dev] RFC 101: Content Dependant Legend Rendering

Worth,
Independantly of this RFC, the concept of legend rendering when using
attribute binding is ill-defined, and this is something that cannot be
fixed by code alone. If your use-case results in a tractable legend
rendering (i.e. only a handfull of attribute values get binded) then I
would suggest that you adapt your code to dynamically create those
CLASSes, and drop the attribute binding alltogether.

--
thomas

On 22 August 2013 02:17, Worth Lutz <wal3 at mindspring.com> wrote:
> Thomas,
>
> This looks like something I need! One question though.
>
> If I have a layer with one class and the style defined by attributes
> selected by my DATA statement query, will this create all those legend
> icons?
>
> Example:
>
>  CLASS
>     #NAME "AaA"
>     #EXPRESSION "AaA"
>     STYLE
>       COLOR [color]
>       OUTLINECOLOR [outlinecolor]
>     END
>     INCLUDE "layers/soil_label.inc"
>   END
>
> I do see the one problem. You cannot use an attribute for the NAME which
is
> what shows up in the legend.
>
> Where this would be helpful is where I have many different classes but
only
> several (5-10) may show up on one zoomed in view. I can select the colors
> from a small palette and assign them in my query. I just cannot figure out
> how to get a legend.
>
> I hope this makes sense and my spark an idea for a solution.
>
> Thanks,
>
> Worth Lutz
>
>
>
>
>
>
>
> -----Original Message-----
> From: mapserver-dev-bounces at lists.osgeo.org
> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of thomas bonfort
> Sent: Friday, July 19, 2013 9:50 AM
> To: MapServer Dev Mailing List
> Subject: [mapserver-dev] RFC 101: Content Dependant Legend Rendering
>
> Devs,
> Please find RFC 101 which proposes an extension to GetLegendRequest
> image results to only include legend icons for features that are
> actually present in a given map view
>
>
https://github.com/mapserver/docs/blob/5398e449f6307419e2557a5a5ca0404bab827
> 728/en/development/rfc/ms-rfc-101.txt
>
> and soon at: http://mapserver.org/development/rfc/ms-rfc-101.html
>
> I'll be calling for vote on it next week, in time for our upcoming 6.4
> feature-freeze.
>
> Best regards,
> Thomas
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3349 / Virus Database: 3204/6501 - Release Date: 07/18/13
>
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3211/6601 - Release Date: 08/23/13



More information about the mapserver-dev mailing list