Mapscript - problem with binary grid (ADF)

Marcin Zajączkowski mszpak at WP.PL
Sat Oct 30 12:48:29 EDT 2004

Dnia 2004-10-30 17:59, Użytkownik Frank Warmerdam napisał:
> Marcin Zajączkowski wrote:
>> As You adviced I prepared small .map file and mapscript is able to
>> display grids. After next few hours I discovered that the problem is
>> with CLASS in raster layer. When there is created any CLASS, raster
>> layer isn't displayed (in fact it's displayed in white). When I change
>> COLOR then whole layer has COLOR color.
>> To prepare legend (with ability to turn on/off layers) is used
>> layer->numclasses what is logical, because some vector layers has few
>> classes which has to be showed separate.
>> So my actual question is: how can I create class in raster layer and
>> keep ability to display this layer on map?
> In fact there is no way to let MapServer do "regular" rendering of a raster
> layer if there are any classes.  If there are classes, they are used to
> color the raster.
> As I understand it, you were creating a class on the layer in an effort to
> introduce a legend entry, is that right?  Lots of folks run into the same
> issue and I think we need a different way of introducing legend entries.

Sadly to hear. I would try to change legend code to check is it raster
layer and treats it as one "object" and in case of vector checks all
classes. But now I think crumble it to class level was logical mistake,
because I'm not able (am I right?) to turn off specific class, only
layer. So checks map->numlayers should be enough.
Maybe there is another (better) technique to make legends in mapscript?


More information about the mapserver-users mailing list