Ticket #2804 (new defect)

Opened 5 years ago

Last modified 3 years ago

named styles (rfc-39) for raster and annotation layers missing

Reported by: mko Owned by: assefa
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: 5.2
Severity: normal Keywords: styles, raster, rfc39
Cc: mko, jmckenna

Description

Mapserver ignores classgroup and corresponding class/group parameters for raster layers. A url parameter &STYLES=xxx will apply to vector layers only.

Possible fix in msGetClass():

  for(i=0; i<layer->numclasses; i++) {
+    if ( layer->class[i]->group && layer->classgroup && strcasecmp(layer->class[i]->group, layer->classgroup) != 0 )
+        continue;
     if (layer->class[i]->expression.string == NULL) /* Empty expression - always matches */
         return(i);

Attachments

mapraster.c.patch Download (0.6 KB) - added by mko 4 years ago.
named styles for raster layers
maputil.c.patch Download (1.6 KB) - added by mko 4 years ago.
named styles for annotation layers

Change History

Changed 4 years ago by mko

named styles for raster layers

Changed 4 years ago by mko

named styles for annotation layers

  Changed 4 years ago by mko

  • summary changed from named styles (rfc-39) for raster layers missing to named styles (rfc-39) for raster and annotation layers missing

title changed

  Changed 4 years ago by jmckenna

  • cc jmckenna added

  Changed 4 years ago by jmckenna

note that the maputil.c patch contains all commented lines.

  Changed 4 years ago by mko

... and php_mapscript.c should contain a set function for the classgroup parameter:

else IF_SET_STRING("classgroup",   self->classgroup)

  Changed 4 years ago by assefa

  • milestone set to 5.6.0 release

php mapscript updated. changed the milestone. Will fix it for next release.

follow-up: ↓ 7   Changed 3 years ago by dmorissette

What's the status of this?

in reply to: ↑ 6   Changed 3 years ago by mko

  • cc mko added; m.kofahl@… removed

Replying to dmorissette:

What's the status of this?

I did apply the changes for mapraster and maputil to the 5.6.0 release and it still works as expected, making (in case of WMS) &STYLES=color|gray possible for palette raster data and annotations.

  Changed 3 years ago by mko

By the way, at  http://www.mapserver.org/ogc/wms_server.html NOTE that MapServer does not support named styles should be changed to NOTE that MapServer supports named styles for vector data only (as long this ticket is'nt fully discussed).

Note: See TracTickets for help on using tickets.