[Mapserver-users] Changing Colors in Map !!
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jul 19 05:16:59 PDT 2004
You raise a good issue. I don't usually display legends, but have used
HTML Legend stuff that allows you a lot of control over your legends and
I think you can eliminate layers on a named basis. which might work for you.
Please add a comment to the bug referenced below about this problem. I
hope that the developers will tackle this problem but it helps to have a
complete picture of the problem and issues and their work arounds.
-Steve W
Satyajit wrote:
>
> Hi Steve,
> Thanks a lot for the info. I have not tried your method yet but
> shall try it very soon. And let you know the result. I have a question
> in my mind though. When we add a dummy layer in our map and add classes
> to it ( to preserve the colors ..as you said), the layer will be shown
> in the legend in the browser. That dummy layer in the legend might
> confuse the end user as that layer's features won't be easily visible in
> the map and of course that layer doesn't have much meaning to it. Is
> there any way by which I can add that layer in my map file with all the
> classes but still make it invisible in the legend ?
> Thanks a lot again steve.
> Shall get back to you after modifying my map file.
>
> ~sat
>
> Stephen Woodbridge wrote:
>
>
>>I think I may have created a feature and inserted a one pixel dot on
>>the
>>map that gets covers by later layers. Play with it and if you have a
>>problem let me know and I can dig through old mapfiles and find out
>
> how
>
>>I did it.
>
>
> Here are some examples of preserving the colors in a symbol that were
> changing. The big problem with this approach is that it uses up a lot of
>
> layers, so you might try using one layer with lots of classes, but I'm
> not sure it that will work.
>
> The bug for this problem is:
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=306
> I just updated it with this information.
>
> ## dummy layer to protect symbol colors from changing
> LAYER
> NAME "color_symbol"
> STATUS DEFAULT
> TYPE point
> TRANSFORM false
> FEATURE
> POINTS
> 1 1
> END
> END
> CLASS
> SYMBOL "color_symbol"
> COLOR 0 0 0
> END
> END
> ## protect other colors
> LAYER
> NAME blue
> STATUS DEFAULT
> TYPE point
> TRANSFORM false
> FEATURE
> POINTS
> 1 1
> END
> END
> CLASS
> COLOR 0 0 255
> END
> END
> LAYER
> NAME green
> STATUS DEFAULT
> TYPE point
> TRANSFORM false
> FEATURE
> POINTS
> 1 1
> END
> END
> CLASS
> COLOR 8 206 107
> END
> END
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
>
>
More information about the MapServer-users
mailing list