[Mapserver-users] Transparent symbols

David Mitchell david.mitchell at telogis.com
Tue Mar 30 23:05:32 EST 2004


I am having trouble placing symbols with transparency on my map. When I 
try and put them on the part of the image that is transparent shows up 
as white. I have a symbol defined as:

	SYMBOL # Interstate
		NAME 'interstate'
		TYPE PIXMAP
		IMAGE 'symbols/interstate.png'
		TRANSPARENT 0
	END

This is in my symbols.sym file. The interstate.png is an indexed png 
with alpha channel (although I have also tried a 24-bit PNG). How do I 
make this symbol transparent? My mapfile looks like this:

MAP
	IMAGETYPE png
	OUTPUTFORMAT
		NAME png
		DRIVER "GD/PNG"
		MIMETYPE "image/png"
		IMAGEMODE RGB
		EXTENSION "png"
	END
	SIZE 916 793
	STATUS on
	UNITS dd
	IMAGECOLOR 181 199 214
	FONTSET "fontlist.font"
	SYMBOLSET 'symbols.sym'

	LAYER
		DATA "highway_shields"
		TYPE annotation
		STATUS default
		
		LABELITEM "highway"
		CLASS
			COLOR 0 0 0
			SIZE 18
			SYMBOL 'interstate'
			LABEL
				COLOR 255 255 255
				FONT arial
				TYPE truetype
				SIZE 7
				ANTIALIAS true
				POSITION cc
			END
		END
	END
END

-- 
David Mitchell
Software Engineer
Telogis

NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.



More information about the mapserver-users mailing list