<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
I'm still working in search object in a map. I have added the next
code to MyApp.php (../gmf_apps/MyApp/MyApp.php) :<br>
if ($http_form_vars["nombre"])<br>
{<br>
$nombre = $http_form_vars["nombre"];<br>
$oextent = $oMapSession->oMap->extent;<br>
$capa =
$oMapSession->oMap->getLayerByname("puntos"); ("Capa" is a Layer
Object)<br>
$capa->queryByAttributes("NOMCALLE",$nombre,MS_SINGLE);<br>
if ($capa->getNumResults() > 0)<br>
{<br>
echo "Ha encontrado";<br>
$oresult = $capa->getResult(0);<br>
// oresult is a <a
href="http://mapserver.gis.umn.edu/doc42/phpmapscript-class-guide.html#result">ResultCacheMemberObj</a><br>
$capa->open();<br>
$oshape =
$capa->getShape($oresult->tileindex,$oresult->shapeindex);<br>
$oextent = $oshape->bounds;<br>
$oshape->free();<br>
//New Extent to show<br>
$nminx = $oextent->minx - 300;<br>
$nmaxx = $oextent->maxx + 300;<br>
$nminy = $oextent->miny - 200;<br>
$nmaxy = $oextent->maxy + 200; (My Map have a
extent = 600 x 400 pixels)<br>
$oextent->setextent($nminx,$nminy,$nmaxx,$nmaxy);<br>
}<br>
$oMapNavigator->zoomRectangle($oextent->minx,$oextent->miny,$oextent->maxx,$oextent->maxy);<br>
}<br>
<br>
At first sight everything works, but always I obtain the same error in
map_navigator.php:<br>
<br>
<b>Fatal error</b>: [MapServer Error]: msCalculateScale(): Invalid
image extent, minx=429849.430340, miny=4466350.489920,
maxx=429849.430340, maxy=4466350.489920. in <b>/home/javi/maplab-2.2/projects/gmf_apps/MyApp/wrapper/map_navigator.php</b>
on line <b>341<br>
<br>
</b>What's Wrong??????<br>
And on the other hand, the single searches are made in the present
View, How Can i search in all the map, although there are parts that
are not shown?<br>
Thanks all.<br>
<br>
My System:<br>
<br>
MapServer 4.2.5<br>
MapLab 2.2<br>
</body>
</html>