[maplab-users] Search objects in a map

publi at infonegocio.com publi at infonegocio.com
Fri Oct 29 12:18:28 EDT 2004

Hi all,
    I'm still working in search object in a map. I have added the next 
code to MyApp.php (../gmf_apps/MyApp/MyApp.php) :
       if ($http_form_vars["nombre"])
            $nombre = $http_form_vars["nombre"];
            $oextent = $oMapSession->oMap->extent;
            $capa = $oMapSession->oMap->getLayerByname("puntos");  
("Capa" is a Layer Object)
            if ($capa->getNumResults() > 0)
                echo "Ha encontrado";
                $oresult = $capa->getResult(0);
                 // oresult is a ResultCacheMemberObj 
                $oshape = 
                $oextent = $oshape->bounds;
                //New Extent to show
                $nminx = $oextent->minx - 300;
                $nmaxx = $oextent->maxx + 300;
                $nminy = $oextent->miny - 200;
                $nmaxy = $oextent->maxy + 200;   (My Map have a extent = 
600 x 400 pixels)

At first sight everything works, but always I obtain the same error in 

*Fatal error*: [MapServer Error]: msCalculateScale(): Invalid image 
extent, minx=429849.430340, miny=4466350.489920, maxx=429849.430340, 
maxy=4466350.489920. in 
on line *341

*What's Wrong??????
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 
Thanks all.

My System:

    MapServer 4.2.5
    MapLab 2.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/maplab-users/attachments/20041029/a8658a56/attachment.htm

More information about the Maplab-users mailing list