How to create a legend containing ONLY classes shown in current map?

Eduardo Spremolla edspremolla at ANTEL.COM.UY
Wed Nov 24 05:46:06 EST 2004


But what Daniele wants, if I understand ok, it to hide legends, not only
based on scale, but on the extend.
You may see the highway, but if you pan left you no longer see it, same
scale, same layers. Difficult implementation :-(

LALO
  
El mar, 23-11-2004 a las 21:30, Ken Lord escribió:
> MapServer CGI will not hide individual classes based on map scale in
> the way that you are hoping to do.
> 
> The way I have attacked this is to place the scale range at which the
> class is visible within the name of the class, so that the name of the
> class and its viewable scale range is listed in the legend.
> 
> hypothetical example of names given to classes in a layer that
> displays highways/roads/trails at different scales:
> 
> Highway < 1:50,000
> Local Roads < 1:20,000
> Trails < 1:5,000
> 
> Cheers,
> Ken Lord
> Vancouver BC
> 
> 
> On Tue, 23 Nov 2004 11:08:24 -0600, Daniele Margotti
> <margottid at comune.lugo.ra.it> wrote:
> > Hi,
> > I have another question about the legend...
> >
> > How can I tell CGI Mapserver to create a legend containing ONLY classes
> > that are visible in the current map?
> >
> > Now I get a legend that contains ALL classes of the selected layer, even
> > if I have zoomed to a very close scale (and I view only one class in the
> > map).
> >
> > Can you help me?
> > Is it possible?
> >
> > Thank you,
> >  Daniele
> >
-- 
Eduardo Spremolla <edspremolla at antel.com.uy>
Antel I+D



More information about the mapserver-users mailing list