<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi.&nbsp; I have been trying to figure this out for quite a while.&nbsp; I have this working within a .map file, but if I set it up exactly the same way with php, it never works.&nbsp; I'm using Firefox to test it, not IE6 (in case someone thinks it's due to IE6 not supporting .png's.&nbsp; The .map file contains the first marker, which works.&nbsp; The .php file attempts to make the second marker use a transparent background.&nbsp; One interesting thing that I've noticed is if I add jibberish to the parameter in this line: $markerLayer-&gt;set(transparency, MS_GD_ALPHA); so as to make the app break, nothing happens.&nbsp; The app doesn't throw up any error messages and continues to render the second marker without transparencies.<br><br>Here is my .map file that works.&nbsp; I put the United States example off the mapserver site to use as a "background" so I could pin my markers via lat/lon and know where I was.&nbsp; So, that's why that's there.&nbsp; I could give a crap about all that.&nbsp; The marker layer is at the bottom.<br><br>NAME USA1<br>&nbsp;&nbsp;&nbsp; STATUS ON<br>&nbsp;&nbsp;&nbsp; DEBUG ON<br>&nbsp;&nbsp;&nbsp; SIZE 800 500<br>&nbsp;&nbsp;&nbsp; IMAGETYPE PNG<br>&nbsp;&nbsp;&nbsp; IMAGECOLOR 140 140 140<br>&nbsp;&nbsp;&nbsp; SHAPEPATH "/var/www/mapserver/campuscomber/data/statesp020/"<br>&nbsp;&nbsp;&nbsp; EXTENT -89.248281 39.082274 -87.205980 41.117268<br>&nbsp;&nbsp;&nbsp; UNITS DD<br>&nbsp;&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp; "proj=latlong" "ellps=GRS80" "datum=NAD83"<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; WEB<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGEPATH "/var/www/mapserver/campuscomber/images/"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGEURL "/mapserver/campuscomber/images/"<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; OUTPUTFORMAT<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME gif<br>&nbsp; &nbsp;&nbsp;&nbsp; DRIVER "GD/GIF"<br>&nbsp; &nbsp;&nbsp;&nbsp; MIMETYPE "image/gif"<br>&nbsp; &nbsp;&nbsp;&nbsp; IMAGEMODE RGBA<br>&nbsp; &nbsp;&nbsp;&nbsp; EXTENSION "gif"<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; OUTPUTFORMAT<br>&nbsp; &nbsp;&nbsp;&nbsp; NAME png<br>&nbsp; &nbsp;&nbsp;&nbsp; DRIVER "GD/PNG"<br>&nbsp; &nbsp;&nbsp;&nbsp; MIMETYPE "image/png"<br>&nbsp; &nbsp;&nbsp;&nbsp; IMAGEMODE RGBA<br>&nbsp; &nbsp;&nbsp;&nbsp; EXTENSION "png"<br>&nbsp;&nbsp;&nbsp; END<br><br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME "US state boundaries"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TYPE POLYGON<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STATUS ON<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DATA "statesp020"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "proj=latlong"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "ellps=GRS80"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "datum=NAD83"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME "US states"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COLOR 80 80 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SYMBOL 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME "credits"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STATUS DEFAULT<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRANSFORM FALSE<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TYPE ANNOTATION<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FEATURE<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; POINTS<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 10 480<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TEXT 'Made with Mapserver.'<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TYPE BITMAP<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; POSITION CR<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; COLOR 250 250 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; LAYER<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NAME "Marker"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TYPE POINT<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STATUS DEFAULT<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRANSPARENCY ALPHA<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SYMBOL 'data/statesp020/red_dot.png'<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SIZE 15<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FEATURE<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; POINTS<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -88.228841 40.104796<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; <br>&nbsp;&nbsp;&nbsp; END<br>END<br><br><br>Here's the .php file with marker #2:<br>&lt;?php<br>//dl("php_mapscript.so");<br><br>$map_file="./markerTest.map";<br>$map = ms_newMapObj($map_file);<br><br>$markerLayer = ms_newLayerObj($map);<br>$markerLayer-&gt;set(name, "Marker2");<br>$markerLayer-&gt;set(type, MS_LAYER_POINT);<br>$markerLayer-&gt;set(status, MS_DEFAULT);<br>$markerLayer-&gt;set(transparency, MS_GD_ALPHA);<br>//Location Marker layer class<br>$markerClass = ms_newClassObj($markerLayer);<br>//Location Marker layer class style<br>$markerStyle = ms_newStyleObj($markerClass);<br>//Gives the location of the symbol to place as a marker<br>$markerStyle-&gt;set(symbolname, "data/statesp020/red_dot.png");<br>//Sets the size of the marker.&nbsp; The bigger, the badder.......<br>$markerStyle-&gt;set(size, 15);<br><br>$image=$map-&gt;draw();<br><br>$markerPoint = ms_newPointObj();<br>$markerPoint-&gt;setXY(-88.227167, 41.015752);<br>$markerLine = ms_newLineObj();<br>//$markerLine-&gt;addXY(-88.227167, 41.015752);<br>$markerLine-&gt;add($markerPoint);<br>$markerShape = ms_newShapeObj(MS_SHAPE_POINT);<br>$markerShape-&gt;add($markerLine);<br>$markerLayer-&gt;addFeature($markerShape);<br>$layer=$map-&gt;getLayerByName("Marker2");<br>//Draws the point using the map, layer Marker2, and the image generated<br>$markerShape-&gt;draw($map, $layer, $image);<br><br>$image_url=$image-&gt;saveWebImage();<br><br>?&gt;<br>&nbsp;&lt;html&gt;<br>&nbsp;&lt;head&gt;<br>&nbsp;&lt;title&gt;US state boundaries and Marker Test&lt;/title&gt;<br>&nbsp;&lt;/head&gt;<br>&nbsp;&lt;body&gt;<br>&lt;img src="&lt;?php echo $image_url?&gt;"&gt;<br><br>&nbsp;&lt;p&gt;<br>&nbsp;Marker Test<br>&nbsp;&lt;/p&gt;<br><br>&nbsp;&lt;/body&gt;<br>&lt;/html&gt;<br><br><br>Thanks in advance.<br><br>&nbsp;- Chris<br><br /><hr />Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! <a href='http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews' target='_new'>Try now!</a></body>
</html>