<html>
<head>
</head>
<body>
Hi Lowell,<br>
<br>
that was that!<br>
<br>
the code working is:<br>
$dbrecord = dbase_get_record_with_names ($dbasefile, $theresult -> shapeindex+1);<br>
<br>
<br>
The list rocks!!! Thanks a lot!<br>
<br>
<br>
Peter<br>
<br>
<br>
<br>
Lowell.Filak wrote:<br>
<blockquote type="cite" cite="mid:Pine.LNX.4.33.0203260823330.13020-100000@yogi.medinaco.net">
<pre wrap="">Try adding 1 to the result during the dbase query. The shape index starts<br>at 0 but the dbase file records start at 1. Hopefully that should give you<br>the correct result.<br>Lowell F.<br><br> On Tue, 26 Mar 2002, Peter wrote:<br><br></pre>
<blockquote type="cite">
<pre wrap="">Hi Listers,<br><br>doing a querybypoint the zoom to the queried polygon is doing well, but<br>the information is wrong. It gives the wrong result. Here's the code:<br><br>Thanks a lot<br><br><br>Peter<br><br><br> $queryresult = @$map -> queryByPoint ($querypoint, MS_SINGLE, -1);<br><br><br> if ($queryresult == MS_SUCCESS) {<br><br> /* Bei einem Erfolg: Ergebnisse aus dem gewünschten Layer holen*/<br> $resultlayer = $map -> getLayerByName ('objekte');<br><br>/* Uns interessiert nur das erste (i.e. nullte) Resultat */<br> $theresult = $resultlayer -> getResult (0);<br> $shapefile = ms_newShapefileObj ('<a class="moz-txt-link-freetext" href="C:%5CProgramme%5CApache">C:\Programme\Apache</a><br>Group\Apache\htdocs\immogis3w\code\data\objekte', -1);<br> $resultshape = $shapefile -> getShape ($theresult -> shapeindex);<br> $resultbounds = $resultshape -> bounds;<br><br><br><br> /* Karte auf diese Extents zoomen */<br>
$ma
p -> setExtent ($resultbounds -> minx-80, $resultbounds -><br>miny-80,$resultbounds -> maxx+80, $resultbounds -> maxy+80); = CORRECT<br>ZOOM!!!<br> $resultlayer = $map -> getLayerByName ('objekte');<br> $numresults = $resultlayer -> getNumResults ();<br> $theresult = $resultlayer -> getResult (0);<br> $resultclass = $resultlayer -> getClass (0);<br><br> $dbasefile = dbase_open ("<a class="moz-txt-link-freetext" href="C:%5CProgramme%5CApache">C:\Programme\Apache</a><br>Group\Apache\htdocs\immogis3w\code\data\objekte.dbf", 0);<br> $dbrecord = dbase_get_record_with_names ($dbasefile, $theresult -><br>shapeindex);<br> $Dummy = $dbrecord['ID'];<br> printf ("%f<br>", $Dummy); = WRONG RESULT!!!<br><br><br><br><br></pre>
</blockquote>
<pre wrap=""><!----><br><br></pre>
</blockquote>
<br>
<br>
</body>
</html>