<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
(Problem described on second parapraph.)<br><br>Alrighty...........it works!&nbsp; What's most exciting is that the problem that I eluded to in my last reply (the markers or points being off a few hundred yards in a circular pattern) has been fixed as a result of all your advice from earlier.&nbsp; I don't know if it was from me using a shapefile to describe the tile index or if it was from me adjusting lines 1 &amp; 4 in the world file to correctly define the x and y map unit/pixel ratio.&nbsp; I'll play around with it and figure it out.&nbsp; I got it working last Friday right before I left work.&nbsp; Thanks a million!<br><br>Now - one minor issue.&nbsp; The markers that I'm placing all display and show up at the right spots, but they aren't displaying there transparent backgrounds.&nbsp; I'm using .png's, and always there's a black background being displayed.&nbsp; I've double checked in The GIMP and there's definitely no background.&nbsp; I noticed on the Mapscript API in the "Layers" class that there's a member called transparency and that it takes an int value.&nbsp; I know that a lot of the members that say int actually take a constant as defined in the constants section, but none of them work (MS_ON, MS_TRUE, MS_YES, MS_GD_ALPHA) and actual integers like -10 through 10 don't work either.&nbsp; I know the layer's type shouldn't be set to Raster.&nbsp; <br><br>Here's the code snippets and sections where I define my marker and the layer it is on:<br><br>//Location Marker Layer<br>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
$markerLayer = ms_newLayerObj($map);<br>
$markerLayer-&gt;set(name, "Marker");<br>
$markerLayer-&gt;set(type, MS_LAYER_POINT);<br>
$markerLayer-&gt;set(status, MS_DEFAULT);<br>
//Location Marker layer class<br>
$markerclass = ms_newClassObj($markerLayer);<br>
//Location Marker layer class style<br>
$markerstyle = ms_newStyleObj($markerclass);<br>
//Sets the size of the marker.&nbsp; The bigger, the badder.......<br>
$markerstyle-&gt;set(size, 15);<br>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>and<br><br>$layer=$map-&gt;getLayerByName("Marker");<br>
$layer-&gt;status = MS_DEFAULT;<br>
//Loop creates marker points then populates them on the map<br>
for($i=0; $i&lt;$markerCount; $i++){<br>
&nbsp;&nbsp;&nbsp; //Creates a point so the marker can be drawn<br>
&nbsp;&nbsp;&nbsp; $marker[$i] = ms_newPointObj();<br>
&nbsp;&nbsp;&nbsp; //Sets that marker according to respective x,y's<br>
&nbsp;&nbsp;&nbsp; $marker[$i]-&gt;setXY($mx[$i], $my[$i]);<br>
&nbsp;&nbsp;&nbsp; //Gives the location of the symbol to place as a marker<br>
&nbsp;&nbsp;&nbsp; $markerstyle-&gt;set(symbolname, "data/statesp020/$mi[$i]");<br>
&nbsp;&nbsp;&nbsp; //Draws the point using the map, layer Marker, and the image generated, and the only class it has (Index 0)<br>
&nbsp;&nbsp;&nbsp; $marker[$i]-&gt;draw($map, $layer, $image, 0, "");<br>
}<br><br>Here's the rest of my php (with the code above in it):<br><br>&lt;?php<br>//Takes the $_GET array's and keys and sets them to another array <br>$keys = array_keys($_GET);<br>//This loop will find all values that have a name lat, lon, and mi (marker icon) and set them to their own array<br>foreach($keys as $curvar){<br>&nbsp;&nbsp;&nbsp; if((substr($curvar, 0, 3))=="lat"){<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $my[] = $_GET[$curvar];<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; if((substr($curvar, 0, 3))=="lon"){<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $mx[] = $_GET[$curvar];<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; if((substr($curvar, 0, 2))=="mi"){<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $mi[] = $_GET[$curvar];<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>//The count of how many points were entered in<br>$markerCount = count($mx);<br><br>//echo "&lt;br&gt;The marker count is: $markerCount&lt;br&gt;";<br><br>//Map pic width, height parameters<br>//////////////////////////////////////////////////////////////////////////<br>$mapwidth = $_GET['width'];<br>$mapheight = $_GET['height'];<br><br>//New point object for Zooming<br>$centerpoint = ms_newPointObj();<br>//Taking the center points of the image<br>$centerX = $mapwidth/2;<br>$centerY = $mapheight/2;<br>$centerpoint-&gt;setXY($centerX, $centerY);<br>//////////////////////////////////////////////////////////////////////////<br><br>//The zoompoint and zoomscale parameters<br>//////////////////////////////////////////////////////////////////////////<br>//$zoompoint = $_GET['zoompoint'];&nbsp;&nbsp;&nbsp; ZOOMPOINT ZOOMS IN ON A PIXEL<br>$zoomscale = $_GET['zoomscale'];<br>//////////////////////////////////////////////////////////////////////////<br><br>//Center Coordinates passed will be in decimal degrees<br>//////////////////////////////////////////////////////////////////////////<br>$x = $_GET['lon1'];<br>$y = $_GET['lat1'];<br><br>//Create a new recObj with dd extents<br>$extent = ms_newRectObj();<br><br>//Set those extents<br>$extent-&gt;setextent($x-.002, $y-.002, $x+.002, $y+.002);<br><br>//Set the newly adjusted extent variables<br>$x1 = $extent-&gt;minx;<br>$y1 = $extent-&gt;miny;<br>$x2 = $extent-&gt;maxx;<br>$y2 = $extent-&gt;maxy;<br><br>//Upper left and lower right coordinates<br>//$ULx = $x1;<br>//$ULy = $y2;<br>//$LRx = $x2;<br>//$LRy = $y1;<br>//////////////////////////////////////////////////////////////////////////<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//The Map Itself<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>//The mapfile path and map file itself<br>$map_path = "/var/www/mapserver/campuscomber/";<br>$map_file = "indexAlt.map";<br>$map = ms_newMapObj($map_path.$map_file);<br><br>//The size of the window set by mapserver<br>$map-&gt;setSize($mapwidth, $mapheight);<br><br>//The name of the map<br>$map-&gt;set(name, "US Universities");<br><br>$app = $_GET['app'];<br>//The type of image produced depending if request comes from Wap, Kiwi, or Webcomber<br><br>if($app=="app"){<br>&nbsp;&nbsp;&nbsp; $map-&gt;selectOutputFormat("GIF");<br>&nbsp;&nbsp;&nbsp; //Sets the output format type<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(name, "gif");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(driver, "GD/GIF");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(mimetype, "image/gif");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(imagemode, MS_IMAGEMODE_RGB);<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(extension, "gif");<br>}<br>if($app=="kiwi" || $app=="web"){<br>&nbsp;&nbsp;&nbsp; $map-&gt;selectOutputFormat("PNG");<br><br>&nbsp;&nbsp;&nbsp; //Sets the output format type<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(name, "png");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(driver, "GD/PNG");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(mimetype, "image/png");<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(imagemode, MS_IMAGEMODE_PC256);<br>&nbsp;&nbsp;&nbsp; $map-&gt;outputformat-&gt;setOption(extension, "png");<br>}<br><br>//The color of the background<br>$map-&gt;imagecolor-&gt;setRGB(140, 140, 140);<br><br>//Tells where the US Shapefile info and images are located<br>$map-&gt;set(shapepath, "/var/www/mapserver/campuscomber/data/statesp020/");<br>//Sets the map projection lat/lon<br>$map-&gt;setProjection("+proj=latlong +ellps=GRS80 +datum=NAD83");<br>//sets the EXTENT<br>$map-&gt;setExtent($x1, $y1, $x2, $y2);<br><br>$map-&gt;set(units, MS_DD);<br>$map-&gt;set(debug, MS_ON);<br><br>//Web Object which specifies the image path and the image url for the image Maperver generates<br>$map-&gt;web-&gt;set(imagepath, "/var/www/mapserver/campuscomber/images/");<br>$map-&gt;web-&gt;set(imageurl, "/mapserver/campuscomber/images/");<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//United States layer<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>$us = ms_newLayerObj($map);<br>$us-&gt;set(name, "US state polygons");<br>$us-&gt;set(type, MS_LAYER_POLYGON);<br>$us-&gt;set(status, MS_DEFAULT);<br>$us-&gt;set(data, "statesp020");<br>//United States layer class<br>$usclass = ms_newClassObj($us);<br>//United States layer class style<br>$usstyle = ms_newStyleObj($usclass);<br>$usstyle-&gt;color-&gt;setRGB(240, 230, 140);<br>$usstyle-&gt;set(symbol, 0);<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//US Boundaries Layer<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>$usbounds = ms_newLayerObj($map);<br>$usbounds-&gt;set(name, "US state boundaries");<br>$usbounds-&gt;set(type, MS_LAYER_LINE);<br>$usbounds-&gt;set(status, MS_DEFAULT);<br>$usbounds-&gt;set(data, "statesp020");<br>//US Boundaries layer class<br>$usboundsclass = ms_newClassObj($usbounds);<br>//US Boundaries layer class style<br>$usboundsstyle = ms_newStyleObj($usboundsclass);<br>$usboundsstyle-&gt;color-&gt;setRGB(50, 50, 50);<br>$usboundsstyle-&gt;set(size, 3);<br>$usboundsstyle-&gt;set(symbol, 0);$usboundsstyle-&gt;set(symbol, 0);<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//University Map Layer (Actually, I don't think we even need this layer - but ehhh, who knows?)<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>$university = ms_newLayerObj($map);<br>$university-&gt;set(name, "University of Illinois");<br>$university-&gt;set(type, MS_LAYER_RASTER);<br>$university-&gt;set(status, MS_OFF);<br>$university-&gt;set(data, "UofICampusMapAlt.gif");<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//Tiled University Map Layer<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>$universityTiles = ms_newLayerObj($map);<br>$universityTiles-&gt;set(name, "University of Illinois Tiles");<br>$universityTiles-&gt;set(type, MS_LAYER_RASTER);<br>$universityTiles-&gt;set(status, MS_DEFAULT);<br>$universityTiles-&gt;set(tileindex, "u_of_ill.shp");<br>$universityTiles-&gt;set(tileitem, "Location");<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//Location Marker Layer<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>$markerLayer = ms_newLayerObj($map);<br>$markerLayer-&gt;set(name, "Marker");<br>$markerLayer-&gt;set(type, MS_LAYER_POINT);<br>$markerLayer-&gt;set(status, MS_DEFAULT);<br>//Location Marker layer class<br>$markerclass = ms_newClassObj($markerLayer);<br>//Location Marker layer class style<br>$markerstyle = ms_newStyleObj($markerclass);<br>//Sets the size of the marker.&nbsp; The bigger, the badder.......<br>$markerstyle-&gt;set(size, 15);<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//$map-&gt;zoompoint(1, $centerpoint, $mapwidth, $mapheight, $extent);<br>//Sets the zoom scale for zooming in and out<br>$map-&gt;zoomscale($zoomscale, $centerpoint, $mapwidth, $mapheight, $extent);<br>//Draws the image<br>$image=$map-&gt;draw();<br>//Gets the Marker Layer<br>$layer=$map-&gt;getLayerByName("Marker");<br>$layer-&gt;status = MS_DEFAULT;<br>//Loop creates marker points then populates them on the map<br>for($i=0; $i&lt;$markerCount; $i++){<br>&nbsp;&nbsp;&nbsp; //Creates a point so the marker can be drawn<br>&nbsp;&nbsp;&nbsp; $marker[$i] = ms_newPointObj();<br>&nbsp;&nbsp;&nbsp; //Sets that marker according to respective x,y's<br>&nbsp;&nbsp;&nbsp; $marker[$i]-&gt;setXY($mx[$i], $my[$i]);<br>&nbsp;&nbsp;&nbsp; //Gives the location of the symbol to place as a marker<br>&nbsp;&nbsp;&nbsp; $markerstyle-&gt;set(symbolname, "data/statesp020/$mi[$i]");<br>&nbsp;&nbsp;&nbsp; //Draws the point using the map, layer Marker, and the image generated, and the only class it has (Index 0)<br>&nbsp;&nbsp;&nbsp; $marker[$i]-&gt;draw($map, $layer, $image, 0, "");<br>}<br>//Produces a url to reference the image by<br>$image_url=$image-&gt;saveWebImage();<br>echo $image_url."&lt;br&gt;";<br>?&gt;<br>&lt;html&gt;<br>&nbsp;&nbsp;&nbsp; &lt;head&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Mapserver "University of Illinois"&lt;/title&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>&nbsp;&nbsp;&nbsp; &lt;body&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;img src="&lt;?php echo $image_url?&gt;"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>&lt;/html&gt;<br><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>