[Chameleon] Odd color switching when using identify andtransparency is set

Aaron Racicot aaronr at ecotrust.org
Thu Jan 19 19:04:46 EST 2006


Hi there Jennifer,
Glad to hear things are going well with your app.  It might have to do
with you not defining an IMAGETYPE in your mapfile and defaulting to an
8-bit image type?  Running out of colors is a common problem people run
into.  Try switching to something like:

IMAGETYPE  png24

Not sure if that is the problem, but maybe it will get you going again!

Take care,

Aaron

+----------------------------------------+
| Aaron Racicot  | aaronr at ecotrust.org   |
| GIS Programmer | 503.467.0759          |
+----------------------------------------+
| e c o t r u s t                        |
| Jean Vollum Natural Capital Center     |
| 721 NW Ninth Avenue                    |
| Suite 200                              |
| Portland, OR 97209                     |
| www.ecotrust.org                       |
+----------------------------------------+


-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Jennifer
Shanks
Sent: Thursday, January 19, 2006 3:09 PM
To: chameleon at lists.maptools.org
Subject: [Chameleon] Odd color switching when using identify
andtransparency is set


Hello,

Everything was fine with my map colors until I added TRANSPARENCY 80 
to my Parks layer.

My querymap hilite is set to red.  I also have another layer 
campgrounds that is symbolized by red triangles.  The colors look 
fine if I'm just panning and zooming.  When I use identify tool to 
click on a park, the hilite for the polygon is black and all of my 
campground symbols also turn black.

After more experimenting, I found that if I turn off the hillshade 
raster, I don't have the color switching problem.

Any suggestions as to what the problem might be?  I've attached my 
mapfile below.

Regards,
Jennifer


#
# Start of map file
#
# Sample map file for a chameleon app.
#
NAME DEMO
STATUS ON
SIZE 360 360
SYMBOLSET ../etc/symbols.sym
EXTENT 440057.57 4079087.55 675801.58 4300037.25
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
TRANSPARENT FALSE




#
# Start of web interface definition
#
WEB
   #MINSCALE 2000000
   #MAXSCALE 50000000
#
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the
root # of the drive where the .MAP file resides. #
   IMAGEPATH "/ms4w/tmp/ms_tmp/"
   IMAGEURL "/ms_tmp/"
#  LOG "/tmp/gmap.log"
   METADATA
   END
END

#
# Start of reference map
#
REFERENCE
    IMAGE images/keymap.gif
    EXTENT 440057.57 4079087.55 675801.58 4300037.25
    STATUS ON
   COLOR -1 -1 -1
   OUTLINECOLOR 255 0 0
   SIZE 90 90
END

#
# Start of legend
#
LEGEND
   KEYSIZE 18 12
   LABEL
     TYPE BITMAP
     SIZE MEDIUM
     COLOR 0 0 89
   END
   STATUS ON
END

#
# Start of scalebar
#
SCALEBAR
   IMAGECOLOR 255 255 255
   LABEL
     COLOR 0 0 0
     SIZE SMALL
   END
   SIZE 150 5
   COLOR 255 255 255
   BACKGROUNDCOLOR 0 0 0
   OUTLINECOLOR 0 0 0
   UNITS miles
   INTERVALS 5
   STATUS ON
END

QUERYMAP
   STATUS ON
   STYLE Hilite
   COLOR 255 0 0
END

PROJECTION
     "init=epsg:32610"
END

#
# Start of layer definitions
#

LAYER
   GROUP "Raster"
   NAME "Hillshade"
   MAXSCALE 1000000
   METADATA
     "DESCRIPTION" "Elevation/Hillshade"
     "GROUP" "Raster"
     "LAYER" "hillshade"
     SHOWINLEGEND "nope"
   END
   TYPE RASTER
   STATUS ON

   DATA sfbay_30m_hlshd_blur.tif
PROJECTION
     "init=epsg:32610"
END
END #layer

LAYER
   GROUP "Polygon"
   NAME "County Boundaries"
   METADATA
     "DESCRIPTION" "County Boundaries"
     "GROUP" "Polygon"
     "LAYER" "cty24utm"
     SHOWINLEGEND "nope"
   END
   TYPE POLYGON
   STATUS ON
   DATA cty24utm
   TRANSPARENCY 80

   CLASS
     NAME "County Boundaries"
     COLOR 255 255 230
     OUTLINECOLOR 199 199 199
   END
PROJECTION
     "init=epsg:32610"
END
END # layer


LAYER
   GROUP "Polygon"
   NAME "Bay & Ocean"
   METADATA
     "DESCRIPTION" "Bay & Ocean"
     "GROUP" "Polygon"
     "LAYER" "bay_ocean_trim"
     SHOWINLEGEND "nope"
   END
   TYPE POLYGON
   STATUS ON
   DATA bay_ocean_trim
   TRANSPARENCY 100
   CLASS
     NAME "Bay & Ocean"
     COLOR 233 239 245
     OUTLINECOLOR 233 239 245
   END
PROJECTION
     "init=epsg:32610"
END
END # layer


LAYER
   GROUP "Polygon"
   NAME "Parks"
   METADATA
     "DESCRIPTION"   "Parks"
     "RESULT_FIELDS" "HOLD_NAME"
     "GROUP" "Polygon"
     "LAYER" "parks_pub_diss.shp"
   END
   TYPE POLYGON
   STATUS ON
   DATA "parks_pub_diss.shp"
   LABELCACHE on
   LABELITEM "HOLD_NAME"
   LABELMAXSCALE 200000
   TRANSPARENCY 80
     CLASS
     EXPRESSION ('[Min_ACCESS]' eq 'Restricted Public Access')
     NAME "Open Space"
     COLOR 255 204 102
     OUTLINECOLOR 1 139 132
     TEMPLATE "ttt_query.html"
     LABEL
        TYPE truetype
        FONT "sans"
        SIZE 7
        COLOR 1 139 132
        OUTLINECOLOR 255 255 255
        MINDISTANCE 300
        POSITION cc
        WRAP ' '
        MINFEATURESIZE 40
     END #LABEL
   END
   CLASS
     EXPRESSION ('[Min_ACCESS]' eq 'Open Public Access')
     NAME "Open Space"
     COLOR 204 221 153
     OUTLINECOLOR 1 139 132
     TEMPLATE "ttt_query.html"
     LABEL
        TYPE truetype
        FONT "sans"
        SIZE 7
        COLOR 1 139 132
        OUTLINECOLOR 255 255 255
        MINDISTANCE 300
        POSITION cc
        WRAP ' '
        MINFEATURESIZE 40
     END #LABEL
   END
   TOLERANCE 5
PROJECTION
     "init=epsg:32610"
END
END # Layer

LAYER
   GROUP "Line"
   NAME "Trails"
   METADATA
     "DESCRIPTION" "Trails"
     "GROUP" "Line"
     "LAYER" "trails_current"
   END
   TYPE LINE
   TEMPLATE "ttt_query.html"
   STATUS ON
   MAXSCALE 800000
   DATA trails_current
   CLASS
     EXPRESSION ('[STATUS]' eq 'Existing')
     NAME "Trails"
     SIZE 1
     SYMBOL 'dashed'
     COLOR 160 119 85
   END
PROJECTION
     "init=epsg:32610"
END
   TOLERANCE 10
END # Layer


#Campgrounds
LAYER

   GROUP "Point"
   NAME "Campgrounds"
   METADATA
     "DESCRIPTION" "Campgrounds"
     "GROUP" "Point"
     "LAYER" "campgrounds"
   END
   TYPE POINT
   STATUS ON
   DATA campgrounds

   CLASS
     NAME "Campgrounds"
     TEMPLATE "ttt_query.html"
     SIZE 7
     SYMBOL 4
     COLOR 255 0 0

   END
PROJECTION
     "init=epsg:32610"
END
   TOLERANCE 5
END # Layer

SYMBOL
   NAME 'dashed'
   TYPE ELLIPSE
   POINTS 1 1 END
   FILLED true
   STYLE 3 3 3 3 END
END

END # Map File


****************************
Jennifer Shanks
GreenInfo Network
116 New Montgomery, Suite 738
San Francisco, CA 94105
(415) 979-0343 x 306
(415) 979-0371 FAX
**GreenInfo has completely re-done our web site
Go to: www.greeninfo.org



_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



More information about the Chameleon mailing list