Ticket #347 (new defect)

Opened 5 years ago

Last modified 3 years ago

[HTML Legends] [leg_layer_html] block and classes...

Reported by: dmorissette Assigned to: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.0
Severity: normal Keywords:
Cc: jmckenna@dmsolutions.ca

Description

Steve Lime wrote:
> 
> Folks: It seems that if a class does not have a NAME set then it won't
> show in the legend, make sense since that's how image legends work (yes,
> there are other options, but in). However the [leg_layer_html] block
> will still be output for that layer. Seems counter intuitive to me. I
> would expect that if there are no classes to show then  you wouldn't
> want the layer header stuff either. Or am I just missing someting. I
> imagine I can work around it with metadata but it feels like I shouldn't
> have to.
> 

Good question... I think sometimes there are good reasons to show the layer 
block even if there are no classes.  You can think of WMS or raster imagery 
layers for instance.  However there should be a mechanism to more easily disable 
the leg_layer_html block when no classes are present (likely using the opt_flag 
parameter).

Change History

11/26/03 14:39:04 changed by sdlime

Daniel: I kinda need to fix this one. Any objections or suggestions?

Steve

11/26/03 15:10:13 changed by dmorissette

  • owner changed from morissette@dmsolutions.ca to sdlime.
I have no objection to you fixing this, but how? We want layers that have no
classes such as WMS layers to show up in the legend.

Perhaps what we can do is create a new opt_flags value (bit 16) to control this.
It would be described in the html-legend-howto as:

 16: If set then show layer even if if has no visible class (default: hide layers
     in which none of the classes has a name)

Then the 4.1 release notes would have to explain this change of behavior so that
people who upgrade also upgrade their HTML legend templates.

11/26/03 15:15:46 changed by sdlime

That seems reasonable to me. That way the behavior is consistent between image 
and html legends.

12/05/03 16:17:45 changed by jmckenna@dmsolutions.ca

  • cc set to mckenna@dmsolutions.ca.
Steve, I will update the HTML howto with this change when this is done.

06/09/05 13:47:11 changed by jmckenna@dmsolutions.ca

Daniel/Steve, was this opt_flag value implemented?

06/09/05 13:56:23 changed by dmorissette

No, I don't think this has been done, or I don't see any traces in the code
anyway. Too late for 4.6 too (or maybe 4.6.x?)

01/10/06 14:10:54 changed by jmckenna@dmsolutions.ca

i see that this did not make it into 4.8 either.