A rather late response, but this should be helpful on this topic. I reworked the query php so that geomoose will zoom to a bounding box of all of the search results of a query. In your query.php file replace the<br><br>for($rx = 0; $rx < $numResults; $rx++) {<br>
}<br><br>loop with:<br><br>for($rx = 0; $rx < $numResults; $rx++) {<br> $res = $queryLayer->getResult($rx);<br> $aRes = $queryLayer->getFeature($res->shapeindex);<br> $abounds = $aRes->bounds;<br>
if($rx == 0){<br> $theMinX = $abounds->minx;<br> $theMaxX = $abounds->maxx;<br> $theMinY = $abounds->miny;<br> $theMaxY = $abounds->maxy;<br>
}<br> if($theMinX > $abounds->minx){<br> $theMinX = $abounds->minx;<br> }<br> if($theMaxX < $abounds->maxx){<br>
$theMaxX = $abounds->maxx;<br> }<br> if($theMinY > $abounds->miny){<br> $theMinY = $abounds->miny;<br> }<br> if($theMaxY < $abounds->maxy){<br>
$theMaxY = $abounds->maxy;<br> }<br> array_push($resultFeatures, $aRes);<br> }<br><br>then replace<br><br>if(($totalResults == 1 and $firstResult != false) or ($totalResults >= 1 and $zoomToFirst == true)) {<br>
$bounds = $firstResult->bounds;<br> printf('GeoMOOSE.zoomToExtent(%f,%f,%f,%f);', $bounds->minx, $bounds->miny, $bounds->maxx, $bounds->maxy);<br> }<br><br>with<br><br>if($totalResults > 0){<br>
printf('GeoMOOSE.zoomToExtent(%f,%f,%f,%f);', $theMinX, $theMinY, $theMaxX, $theMaxY);<br> }<br><br>Finally, place these lines<br><br>$theMinX = null;<br>$theMaxX = null;<br>$theMinY = null;<br>$theMaxY = null;<br>
<br>just above the line<br><br>for($la = 0; $la < sizeof($query_layers); $la++) {<br><br><br>This should allow the zoom to be adjusted to the maximum bounds of your search results. Best of luck! Feel free to ask any questions.<br>
<br>-Jeff<br><br><div class="gmail_quote">On Thu, Sep 9, 2010 at 3:38 PM, Bill Harbour <span dir="ltr"><<a href="mailto:bharbour@bcbe.org">bharbour@bcbe.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="white" background="?ui=2&ik=63fdd0262e&view=att&th=12af838bdf906fae&attid=0.0.1&disp=emb&zw" link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="3"><span style="font-size: 12pt;">Is there an equivalent to ESRI’s zoom to selected??? I’m
using a query service to find subdivision(s). All the parcels in the sub
get highlighted. If I do a search that contains parts of a sub name…say
the first letters in multiple phases, then all of those subs are
hightlighted. Is there a way to tell the query service to zoom to the
extent of the selected features??</span></font></p>
<p class="MsoNormal"><font color="black" face="Arial" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="MsoNormal"><font color="black" face="Arial" size="3"><span style="font-size: 12pt;">Thanks,</span></font></p>
<p class="MsoNormal"><font color="black" face="Arial" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Baldwin County Public Schools</span></font></p>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Bill</span></font><font size="2"><span style="font-size: 10pt;"> Harbour</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">GIS Coordinator</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Information Technology Services</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Baldwin</span></font><font size="2"><span style="font-size: 10pt;"> County</span></font><font size="2"><span style="font-size: 10pt;"> Board of Education</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">1071<b><b><font face="Arial"><span style="font-family: Arial;"> </span></font></b></b>
B Ave</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Loxley</span></font><font size="2"><span style="font-size: 10pt;">, AL 36551</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">V 251-580-1916</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">F 251-972-6851</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;">Office 251-972-6850</span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;"><a href="mailto:bharbour@bcbe.org" target="_blank">bharbour@bcbe.org</a></span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Arial" size="2"><span style="font-size: 10pt;"><a href="http://www.bcbe.org" target="_blank">http://www.bcbe.org</a></span></font></p>
</div>
<div>
<p class="MsoNormal"><i><i><font color="black" face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;">"When life gets too unreal, sit
down with a good book."</span></font></i></i><font size="1"><span style="font-size: 7.5pt;"> - Garrison Keillor</span></font> </p>
</div>
</div>
<p class="MsoNormal"><font color="black" face="Arial" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
<br>------------------------------------------------------------------------------<br>
This SF.net Dev2Dev email is sponsored by:<br>
<br>
Show off your parallel programming skills.<br>
Enter the Intel(R) Threading Challenge 2010.<br>
<a href="http://p.sf.net/sfu/intel-thread-sfd" target="_blank">http://p.sf.net/sfu/intel-thread-sfd</a><br>_______________________________________________<br>
Geomoose-users mailing list<br>
<a href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br>
<br></blockquote></div><br>