[Mapserver-users] Changing Colors in Map !!

Stephen Woodbridge woodbri at swoodbridge.com
Sat Jul 17 07:26:46 PDT 2004


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






More information about the MapServer-users mailing list