<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Ok.&nbsp; I figured out my last question.&nbsp; Apparently, I needed to have a zoomscale instead of a zoompoint.&nbsp; What I also discovered is that zoomscale needed to be set right before I said map-&gt;draw.&nbsp; If I copied and pasted $map-&gt;zoomscale($zoomscale, $centerpoint, $mapwidth, $mapheight, $utmextent); to where I originally had it (right under where I say $map-&gt;setSize()), then the zoomscale won't work.&nbsp; But, if I move it to where I said earlier, it works.&nbsp; Where I originally had the line was after I had $zoomscale, $centerpoint, $mapwidth, $mapheight, and $utmextent declared and set to something - so why that is I don't know.<br><br>If someone knows that would be great help.&nbsp; I'm just curious that's all.&nbsp; <br><br>Also, what's the point of map-&gt;zoompoint()?&nbsp; From my understanding of the Mapscript API, you could pick a point on the image according to 0, 0 (being the x, y coordinates from the upper left corner), give it the image width and height and the current extent along with an integer representing zoom level and BAM - there you go.&nbsp; But, nothing happened when I kept giving a different value of zoom level (1, -1, 2, -10, etc.).&nbsp; If I comment out the zoompoint too, it doesn't change a thing.&nbsp; I assume I misinterpreted something?<br><br>My 2 files of importance:<br><br>Larrandy.php<br><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;p&gt;Give me ma SPECS, FOOL!!@!@&lt;/p&gt;&lt;hr&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;form action="index3.php" method="get"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Width: &lt;input type="text" name="width" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Height: &lt;input type="text" name="height" /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Zoompoint: &lt;input type="text" name="zoompoint" /&gt;&amp;nbsp; Ex. - 1, 2, 3, 4, -1, -2, etc.&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Zoomscale: &lt;input type="text" name="zoomscale" /&gt;&amp;nbsp; Ex. - 4000, 8000, 16,000, etc.&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Lower Left Corner:&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Latitude #1: &lt;input type="text" name="y1" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Longitue #1: &lt;input type="text" name="x1" /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Upper Right Corner:&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Latitude #2: &lt;input type="text" name="y2" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Longitue #2: &lt;input type="text" name="x2" /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Lat/Long need to be decimal degrees.&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Example: &lt;br&gt;40.071888 -88.244698 &lt;br&gt;40.094110 -88.217468&lt;br&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type="submit" value="Send Request"/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/form&gt;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>&lt;/html&gt;<br><br><br><br><br>index3.php<br><br>&lt;?php<br>//dl("php_mapscript.so");<br><br>//width, height parameters<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>echo "The center X coordinate is: ".$centerpoint-&gt;x.", The center Y coordinate is: ".$centerpoint-&gt;y."&lt;br&gt;";<br><br>//The zoompoint and zoomscale parameters<br>//$zoompoint = $_GET['zoompoint'];<br>//echo "The Zoom Point is: ".$zoompoint."&lt;br&gt;";<br>$zoomscale = $_GET['zoomscale'];<br>echo "The Zoom Scale is: ".$zoomscale."&lt;br&gt;";<br><br>//Coordinates passed will be in decimal degrees.&nbsp; example: -88.244698 40.071888 -88.217468 40.094110<br>$x1 = $_GET['x1'];<br>$y1 = $_GET['y1'];<br>$x2 = $_GET['x2'];<br>$y2 = $_GET['y2'];<br>echo "Before Conversion to UTM: ".$x1." ".$y1." ".$x2." ".$y2."&lt;br&gt;";<br><br>//The lat/long conversion to UTM process<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>//Create a new Rect Obj to be the new, converted EXTENT<br>$ddextent = ms_newRectObj();<br>//Set the extent with the "parameters"<br>$ddextent-&gt;setextent($x1, $y1, $x2, $y2);<br>//Create 2 new Proj Objects to be used for the conversion (latitude/longitude and Universal Transverse Mercator)<br>$latlongProj = ms_newProjectionObj("+proj=latlong +ellps=GRS80 +datum=NAD83");<br>$utmProj = ms_newProjectionObj("+proj=utm +ellps=GRS80 +datum=NAD83 +zone=16 +units=m +north +no_defs");<br>//Convert the lat/long to UTM<br>$ddextent-&gt;project($latlongProj, $utmProj);<br>$utmextent = $ddextent;<br>//Set converted lat/long x,y's to new UTM x,y's<br>$x1 = $utmextent-&gt;minx;<br>$y1 = $utmextent-&gt;miny;<br>$x2 = $utmextent-&gt;maxx;<br>$y2 = $utmextent-&gt;maxy;<br><br>//$y1=$y1+32;&nbsp; THESE +-32's are to possibly compensate for something odd going on with the y's.<br>//$y2=$y2-32;<br>echo "After Conversion to UTM: minX=$x1, minY=$y1, maxX=$x2, maxY=$y2&lt;br&gt;";<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//The mapfile path and map file itself<br>$map_path = "/var/www/mapserver/basic/";<br>$map_file = "index3.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, "GENERIC");<br><br>//The type of image produced (Will need to be changed for later)<br>$map-&gt;selectOutputFormat("PNG");<br><br>//The color of the background<br>$map-&gt;imagecolor-&gt;setRGB(140, 140, 140);<br><br>//Sets the output format type<br>$map-&gt;outputformat-&gt;setOption(name, "png");<br>$map-&gt;outputformat-&gt;setOption(driver, "GD/PNG");<br>$map-&gt;outputformat-&gt;setOption(mimetype, "image/png");<br>$map-&gt;outputformat-&gt;setOption(imagemode, MS_IMAGEMODE_PC256);<br>$map-&gt;outputformat-&gt;setOption(extension, "png");<br><br>/*<br>FOR LATER WHEN DISTINGUISHING WHETHER LARRY OR RANDY REQUESTS THIS<br>$map-&gt;outputformat-&gt;setOption(name, "gif");<br>$map-&gt;outputformat-&gt;setOption(driver, "GD/GIF");<br>$map-&gt;outputformat-&gt;setOption(mimetype, "image/gif");<br>$map-&gt;outputformat-&gt;setOption(imagemode, MS_IMAGEMODE_RGB);<br>$map-&gt;outputformat-&gt;setOption(extension, "gif");<br>*/<br><br>$map-&gt;set(shapepath, "/var/www/mapserver/basic/data/statesp020/");<br>$map-&gt;setProjection("+proj=utm +ellps=GRS80 +datum=NAD83 +zone=16 +units=m +north +no_defs");<br>//$map-&gt;setExtent(393897.50, 4437029.50, 465644.50, 4438945.50);<br>//sets the EXTENT.&nbsp; -.5 is there due to some subtraction going on with the world file<br>$map-&gt;setExtent($x1-.5, $y1-.5, $x2-.5, $y2-.5);<br>$map-&gt;set(units, MS_METERS);<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/basic/images/");<br>$map-&gt;web-&gt;set(imageurl, "/mapserver/basic/images/");<br><br>//The 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>$us-&gt;setProjection("+proj=latlong +ellps=GRS80 +datum=NAD83");<br>//The United States layer class<br>$usclass = ms_newClassObj($us);<br>//The 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>//The United States 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>$usbounds-&gt;setProjection("+proj=latlong +ellps=GRS80 +datum=NAD83");<br>//The US Boundaries layer class<br>$usboundsclass = ms_newClassObj($usbounds);<br>//The 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);<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//University Map Layer<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_DEFAULT);<br>$university-&gt;set(data, "colorUofIllinois.gif");<br>$university-&gt;setProjection("+proj=utm +ellps=GRS80 +datum=NAD83 +zone=16 +units=m +north +no_defs");<br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>//$map-&gt;zoompoint($zoompoint, $centerpoint, $mapwidth, $mapheight, $utmextent);<br>$map-&gt;zoomscale($zoomscale, $centerpoint, $mapwidth, $mapheight, $utmextent);<br>//Draws the image<br>$image=$map-&gt;draw();<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; &nbsp;&nbsp;&nbsp; &lt;p&gt;University of Illinois&lt;/p&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;a href="Larrandy.php"&gt;Go Back&lt;/a&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>&lt;/html&gt;<br><br>&nbsp;- Chris<br><br /><hr />More photos; more messages; more whatever – Get MORE with Windows Live™ Hotmail®. NOW with 5GB storage. <a href='http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907' target='_new'>Get more!</a></body>
</html>