<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=x-gbk" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
You should provide more surrounding code, or say where the code is from.<br>
In the code below, the envelope is never used, so it doesn't matter if
it is there.<br>
I assume it was supposed to be combined with the attribute filter like
this:<br>
if ($queryEnvelope != null)<br>
&nbsp;&nbsp;&nbsp; $queryOptions-&gt;SetSpatialFilter($queryEnvelope)<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
¾Ï±ó skrev:
<blockquote cite="mid:tencent_1D54D43E677E0DFC17CE3A83@qq.com"
 type="cite">Why the 'BBOX' does not exist?If this happens,can I get
the 'geometry'?<br>
the codes is as following:<br>
if (array_key_exists('BBOX', $_GET))<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // split the client's BBOX return by commas and spaces to
obtain an array of coordinates<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $coords = preg_split('/,|\s/', $_GET['BBOX']);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $lowerLeft =
$geometryFactory-&gt;CreateCoordinateXY($coords[0], $coords[1]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $upperRight =
$geometryFactory-&gt;CreateCoordinateXY($coords[2], $coords[3]);<br>
  <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $queryEnvelope = new MgEnvelope($lowerLeft, $upperRight);<br>
&nbsp;&nbsp;&nbsp; }<br>
  <br>
$featureService =
$siteConnection-&gt;CreateService(MgServiceType::FeatureService);<br>
&nbsp;&nbsp;&nbsp; $queryOptions = new MgFeatureQueryOptions();<br>
  <br>
&nbsp;&nbsp;&nbsp; $filter = urldecode($_GET["FILTER"]) ;<br>
&nbsp;&nbsp;&nbsp; //echo "&lt;p&gt;$filter&lt;/p&gt;";<br>
&nbsp;&nbsp;&nbsp; echo '&lt;Folder&gt;';<br>
&nbsp;&nbsp;&nbsp; echo '&lt;description&gt;MapGuide - Wheaton Parcels Filtered
['.$filter.'] &lt;/description&gt;';<br>
&nbsp;&nbsp;&nbsp; echo '&lt;name&gt;Wheaton Parcels&lt;/name&gt;';<br>
&nbsp;&nbsp;&nbsp; echo '&lt;visibility&gt;0&lt;/visibility&gt;';<br>
&nbsp;&nbsp;&nbsp; echo '&lt;open&gt;1&lt;/open&gt;';<br>
  <br>
&nbsp;&nbsp;&nbsp; $queryOptions-&gt;SetFilter($filter);<br>
&nbsp;&nbsp;&nbsp; //Feature Source being used in the application<br>
&nbsp;&nbsp;&nbsp; $featureReader = $featureService-&gt;SelectFeatures(new
MgResourceIdentifier("Library://test/Data/province.FeatureSource"),
"province", $queryOptions);<br>
&nbsp;&nbsp;&nbsp; //if($featureReader!=null) echo "&lt;p&gt;feature
success!&lt;/p&gt;";<br>
&nbsp;&nbsp;&nbsp; $geometryReaderWriter = new MgAgfReaderWriter();<br>
&nbsp;&nbsp;&nbsp; echo '&lt;p&gt;test1&lt;/p&gt;';<br>
&nbsp;&nbsp;&nbsp; //Read Feature Source Attributes for populating Tooltip on Google
Earth<br>
&nbsp;&nbsp;&nbsp; //Change this if using a different Feature Source<br>
&nbsp;&nbsp;&nbsp; $byteReader = $featureReader-&gt;GetGeometry('Geometry');<br>
&nbsp;&nbsp;&nbsp; //if($byteReader) echo '&lt;p&gt;feature success!&lt;/p&gt;';<br>
&nbsp;&nbsp;&nbsp; $geometry = $geometryReaderWriter-&gt;Read($byteReader);<br>
  <br>
  <div>
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
  </p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
</body>
</html>