<!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>
$queryOptions->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>
{<br>
// split the client's BBOX return by commas and spaces to
obtain an array of coordinates<br>
$coords = preg_split('/,|\s/', $_GET['BBOX']);<br>
$lowerLeft =
$geometryFactory->CreateCoordinateXY($coords[0], $coords[1]);<br>
$upperRight =
$geometryFactory->CreateCoordinateXY($coords[2], $coords[3]);<br>
<br>
$queryEnvelope = new MgEnvelope($lowerLeft, $upperRight);<br>
}<br>
<br>
$featureService =
$siteConnection->CreateService(MgServiceType::FeatureService);<br>
$queryOptions = new MgFeatureQueryOptions();<br>
<br>
$filter = urldecode($_GET["FILTER"]) ;<br>
//echo "<p>$filter</p>";<br>
echo '<Folder>';<br>
echo '<description>MapGuide - Wheaton Parcels Filtered
['.$filter.'] </description>';<br>
echo '<name>Wheaton Parcels</name>';<br>
echo '<visibility>0</visibility>';<br>
echo '<open>1</open>';<br>
<br>
$queryOptions->SetFilter($filter);<br>
//Feature Source being used in the application<br>
$featureReader = $featureService->SelectFeatures(new
MgResourceIdentifier("Library://test/Data/province.FeatureSource"),
"province", $queryOptions);<br>
//if($featureReader!=null) echo "<p>feature
success!</p>";<br>
$geometryReaderWriter = new MgAgfReaderWriter();<br>
echo '<p>test1</p>';<br>
//Read Feature Source Attributes for populating Tooltip on Google
Earth<br>
//Change this if using a different Feature Source<br>
$byteReader = $featureReader->GetGeometry('Geometry');<br>
//if($byteReader) echo '<p>feature success!</p>';<br>
$geometry = $geometryReaderWriter->Read($byteReader);<br>
<br>
<div>
<p> <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>