<!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> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>php_mapscript</FONT></DIV>
<DIV><FONT face=Arial size=2>2 month old build of
mapserver_nightly</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-jb-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> session_start();<BR>
dl("php_mapscript.so");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>require 'config.php';<BR>$dfMinX =
$CUREXTENT[minx];<BR> $dfMinY = $CUREXTENT[miny];<BR> $dfMaxX
= $CUREXTENT[maxx];<BR> $dfMaxY =
$CUREXTENT[maxy];</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>$mapObj = ms_newMapObj("$mapfilePath/$mapfile.map");</DIV>
<DIV> </DIV>
<DIV>######Loop through to display checkboxes for layers, loop the lay_name
array and lay_stats arrays###<BR> for ($i = 0; $i <= ( count
($lay_name_array) -1 ); $i++) {<BR> $layerObj =
$mapObj->getLayerByName($lay_name_array[$i]);<BR>
$layerObj->set("status",$lay_status_array[$i]);<BR>
#$layerObj->free();<BR> }<BR>######END#####################################################<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
$mapObj->setExtent($CUREXTENT[minx],$CUREXTENT[miny],$CUREXTENT[maxx],$CUREXTENT[maxy]);<BR>
$nClickGeoX = GMapPix2Geo(intval($map_x), 0, $width, $dfMinX, $dfMaxX,
0);<BR> $nClickGeoY = GMapPix2Geo(intval($map_y), 0, $height,
$dfMinY, $dfMaxY, 1);<BR> $ptClicked =
ms_newPointObj();<BR>
$ptClicked->setXY($nClickGeoX,
$nClickGeoY);<BR> $queryObj =
$mapObj->queryByPoint( $ptClicked,MS_SINGLE,0
);<BR> $gbShowQueryResults =
TRUE;<BR>#print" $map $map_x $map_y $dataPath \n";</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$img = $mapObj->drawQuery();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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->saveImage("",MS_PNG,0,0, 100);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>function GMapPix2Geo($nPixPos, $dfPixMin,
$dfPixMax, $dfGeoMin, $dfGeoMax, $nInversePix)<BR> {<BR>
$dfWidthGeo = $dfGeoMax - $dfGeoMin;<BR> $dfWidthPix =
$dfPixMax - $dfPixMin;<BR> $dfPixToGeo = $dfWidthGeo /
$dfWidthPix;<BR> if
(!$nInversePix)<BR> $dfDeltaPix =
$nPixPos - $dfPixMin;<BR>
else<BR> $dfDeltaPix = $dfPixMax -
$nPixPos;<BR> $dfDeltaGeo = $dfDeltaPix *
$dfPixToGeo;<BR> $dfPosGeo = $dfGeoMin +
$dfDeltaGeo;<BR> return
($dfPosGeo);<BR> }<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></BODY></HTML>