MapTools.org

[maplab-users] BUG? layers don't show when opt_flag=0

woodbri@swoodbridge.com woodbri@swoodbridge.com
Thu, 5 Sep 2002 19:36:26 -0400
Paul,

It seems to me that what mapserver needs to be able to return is a 
list of layers that actually generated draws on the map, then the 
legend could be generated from that.

The other thing that might be possible is to make all the layers have 
STATUS DEFAULT and let mapserver display based on scale. For simple 
map interface I would like to have the legend displayed, but the user 
does not need to turn layers on and off if you have set up the 
mapfile correctly. For some apps you need the functionality but for 
many you don't and it just complicates the UI.

The other idea would be to generate the layers for non displayed 
legend items as hidden form fields the the value set to the default 
in the mapfile which would simulate having the items displayed in the 
legend but without having to display them until they are within the 
zoom scale.

-Steve

On 5 Sep 2002 at 18:50, Paul Spencer wrote:

> Steven,
> 
> there are some issues with layer visibility and the legends.  There
> are some technical limitations to how well layer visibility can be
> tracked without using sessions.  There is a definite issue with scale
> of visibility.  When layers are turned on because the user zooms
> in/out, the layer name is not in the legend from the previous zoom and
> is assumed to be off.  This is because the HTML checkboxes only pass
> the values that are turned on.  It is not possible to tell (without a
> more sophisticated mechanism than is in gmapfactory) whether the
> change in state was a user choice or a map event (such as coming into
> scale).
> 
> I'm not sure if we are to be able to address this within the scope of
> gmapfactory or not.  If you can determine a better algorithm for
> handling it, we'd be happy to put it in place, though.
> 
> Cheers,
> 
> Paul
> 
> woodbri@swoodbridge.com wrote:
> > OK, I have run into some strangeness with the legend template. I
> > changed the value of [leg_layer_html Opt_Flag=0] from 15 so that it
> > does not display tons of legend items that are not showing on the
> > map, but now all my annotation layers do not toggle on when I zoom
> > in. What's with that?
> > 
> > In fact, have a copyright notice on the image that shows up when you
> > launch the gmapFactory application, but vanishes as soon as you zoom
> > and other annotation that should turn on as you zoom in does not.
> > 
> > BUT, it I set the Opt_Flag=15 then it works but I get lots of 
> > unwanted layers showing in the legend.
> > 
> > Any ideas? Did I miss something?
> > 
> > Here is the app with Opt_Flag=0:
> >    http://imaptools.com/vmap0/
> > 
> > Here is the app with Opt_Flag=15:
> >    http://imaptools.com/vmap0a/
> > 
> > There is not other differences.
> > 
> > Thanks,
> >   -Steve
> > 
> > _______________________________________________
> > Maplab-users mailing list
> > Maplab-users@dmsolutions.ca
> > http://lists.dmsolutions.ca/mailman/listinfo/maplab-users
> > 
> 
> 
> -- 
> Paul Spencer
> Applications and Software Development
> DM Solutions Group
> 
> _______________________________________________
> Maplab-users mailing list
> Maplab-users@dmsolutions.ca
> http://lists.dmsolutions.ca/mailman/listinfo/maplab-users
> 




This archive was generated by Pipermail.