<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am using this function for selecting, and 
highlighting parcels, however when I do select a parcel, the hole map seems to 
shift down, and to the right a little. Not sure who wrote this function though. 
Any sugestions?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>php_mapscript</FONT></DIV>
<DIV><FONT face=Arial size=2>2&nbsp;month old build of 
mapserver_nightly</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-jb-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;session_start();<BR>&nbsp; 
dl("php_mapscript.so");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>require 'config.php';<BR>$dfMinX = 
$CUREXTENT[minx];<BR>&nbsp; $dfMinY = $CUREXTENT[miny];<BR>&nbsp;&nbsp; $dfMaxX 
= $CUREXTENT[maxx];<BR>&nbsp;&nbsp;&nbsp; $dfMaxY = 
$CUREXTENT[maxy];</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>$mapObj = ms_newMapObj("$mapfilePath/$mapfile.map");</DIV>
<DIV>&nbsp;</DIV>
<DIV>######Loop through to display checkboxes for layers, loop the lay_name 
array and lay_stats arrays###<BR>&nbsp;for ($i = 0; $i &lt;= ( count 
($lay_name_array) -1 ); $i++) {<BR>&nbsp; $layerObj = 
$mapObj-&gt;getLayerByName($lay_name_array[$i]);<BR>&nbsp; 
$layerObj-&gt;set("status",$lay_status_array[$i]);<BR>&nbsp; 
#$layerObj-&gt;free();<BR>&nbsp;}<BR>######END#####################################################<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; 
$mapObj-&gt;setExtent($CUREXTENT[minx],$CUREXTENT[miny],$CUREXTENT[maxx],$CUREXTENT[maxy]);<BR>&nbsp;&nbsp; 
$nClickGeoX = GMapPix2Geo(intval($map_x), 0, $width, $dfMinX, $dfMaxX, 
0);<BR>&nbsp;&nbsp;&nbsp; $nClickGeoY = GMapPix2Geo(intval($map_y), 0, $height, 
$dfMinY, $dfMaxY, 1);<BR>&nbsp;&nbsp;&nbsp;&nbsp; $ptClicked = 
ms_newPointObj();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
$ptClicked-&gt;setXY($nClickGeoX, 
$nClickGeoY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $queryObj = 
$mapObj-&gt;queryByPoint( $ptClicked,MS_SINGLE,0 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $gbShowQueryResults = 
TRUE;<BR>#print" $map $map_x $map_y $dataPath \n";</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>$img = $mapObj-&gt;drawQuery();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>header("Cache-Control: no-cache, 
must-revalidate");<BR>header("Pragma: no-cache");<BR>header("content-type: 
image/png");<BR>$img-&gt;saveImage("",MS_PNG,0,0, 100);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>function GMapPix2Geo($nPixPos, $dfPixMin, 
$dfPixMax, $dfGeoMin, $dfGeoMax, $nInversePix)<BR>&nbsp;{<BR>&nbsp;&nbsp;&nbsp; 
$dfWidthGeo = $dfGeoMax - $dfGeoMin;<BR>&nbsp;&nbsp;&nbsp; $dfWidthPix = 
$dfPixMax - $dfPixMin;<BR>&nbsp;&nbsp;&nbsp; $dfPixToGeo = $dfWidthGeo / 
$dfWidthPix;<BR>&nbsp;&nbsp;&nbsp; if 
(!$nInversePix)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dfDeltaPix = 
$nPixPos - $dfPixMin;<BR>&nbsp;&nbsp;&nbsp; 
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $dfDeltaPix = $dfPixMax - 
$nPixPos;<BR>&nbsp;&nbsp;&nbsp; $dfDeltaGeo = $dfDeltaPix * 
$dfPixToGeo;<BR>&nbsp;&nbsp;&nbsp; $dfPosGeo = $dfGeoMin + 
$dfDeltaGeo;<BR>&nbsp;&nbsp;&nbsp; return 
($dfPosGeo);<BR>&nbsp;}<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT></BODY></HTML>