You should provide more surrounding code, or say where the code is from.
In the code below, the envelope is never used, so it doesn't matter if
it is there.
I assume it was supposed to be combined with the attribute filter like this:
if ($queryEnvelope != null)
$queryOptions->SetSpatialFilter($queryEnvelope)
Regards, Kenneth Skovhede, GEOGRAF A/S
???? skrev:
Why the 'BBOX' does not exist?If this happens,can I get the 'geometry'?
the codes is as following:
if (array_key_exists('BBOX', $_GET))
{
// split the client's BBOX return by commas and spaces to obtain an
array of coordinates
$coords = preg_split('/,|\s/', $_GET['BBOX']);
$lowerLeft = $geometryFactory->CreateCoordinateXY($coords[0], $coords[1]);
$upperRight = $geometryFactory->CreateCoordinateXY($coords[2],
$coords[3]);
$queryEnvelope = new MgEnvelope($lowerLeft, $upperRight);
}
$featureService =
$siteConnection->CreateService(MgServiceType::FeatureService);
$queryOptions = new MgFeatureQueryOptions();
$filter = urldecode($_GET["FILTER"]) ;
//echo "<p>$filter</p>";
echo '<Folder>';
echo '<description>MapGuide - Wheaton Parcels Filtered ['.$filter.']
</description>';
echo '<name>Wheaton Parcels</name>';
echo '<visibility>0</visibility>';
echo '<open>1</open>';
$queryOptions->SetFilter($filter);
//Feature Source being used in the application
$featureReader = $featureService->SelectFeatures(new
MgResourceIdentifier("Library://test/Data/province.FeatureSource"),
"province", $queryOptions);
//if($featureReader!=null) echo "<p>feature success!</p>";
$geometryReaderWriter = new MgAgfReaderWriter();
echo '<p>test1</p>';
//Read Feature Source Attributes for populating Tooltip on Google Earth
//Change this if using a different Feature Source
$byteReader = $featureReader->GetGeometry('Geometry');
//if($byteReader) echo '<p>feature success!</p>';
$geometry = $geometryReaderWriter->Read($byteReader);
------------------------------------------------------------------------
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users