[Mapserver-users] zoom to results of queryByAttributes

Denis Lalonde denlalonde at yahoo.com
Mon Feb 16 14:17:39 EST 2004


--0-2042797536-1076959059=:65466
Content-Type: text/plain; charset=us-ascii

Hello,
 
How do I get my php/mapscript (4.0)application that uses a MapInfo layer (OGR)  to "zoom&center itself" on the results of my queryByAttributes query.
 
assuming I have this:
$searchitem = "Ontario";
 
$SearchLayer = $MapOBJ->getLayerByName( "Canada" );
$SearchLayer ->queryByAttributes('Province_Name','/'.$searchitem .'/',MS_MULTIPLE);
 
if ($SearchLayer ->getNumResults() > 0 )
{
     //how do I zoom into the found results if they are polygons?
     //how do I zoom into the found results if they are points?
 
    //how do I highlight the found results?
}
 
Thanks,
Denis


---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
--0-2042797536-1076959059=:65466
Content-Type: text/html; charset=us-ascii

<DIV><FONT size=1>Hello,</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>How do I get my php/mapscript (4.0)application that uses a MapInfo layer (OGR) &nbsp;to "zoom&amp;center itself" on the results of my queryByAttributes&nbsp;query.</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>assuming I have this:</FONT></DIV>
<DIV><FONT size=1>$searchitem = "Ontario";</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>$SearchLayer = $MapOBJ-&gt;getLayerByName( "Canada" );</FONT></DIV>
<DIV><FONT size=1>$SearchLayer -&gt;queryByAttributes('Province_Name','/'.$searchitem .'/',MS_MULTIPLE);</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>if ($SearchLayer -&gt;getNumResults() &gt; 0 )</FONT></DIV>
<DIV><FONT size=1>{</FONT></DIV>
<DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp; //how do I zoom into the found results if they are polygons?</FONT></DIV>
<DIV><FONT size=1>&nbsp;&nbsp;&nbsp;&nbsp; //how do&nbsp;I zoom into the found results if they are points?</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>&nbsp;&nbsp;&nbsp; //how do I highlight the found results?</FONT></DIV>
<DIV><FONT size=1>}</FONT></DIV>
<DIV><FONT size=1></FONT>&nbsp;</DIV>
<DIV><FONT size=1>Thanks,</FONT></DIV>
<DIV><FONT size=1>Denis</FONT></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Finance: <a href="http://us.rd.yahoo.com/evt=22055/*http://taxes.yahoo.com/filing.html">Get your refund fast by filing online</a>
--0-2042797536-1076959059=:65466--



More information about the mapserver-users mailing list