<!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">
I see no problem with it.<br>
The filter is bascially an SQL statement, so you can try changing the
URL to:<br>
<a moz-do-not-send="true"
 href="http://localhost:8008/mapguide/test/KMLContentFactory.php?FILTER=%22.urlencode%28$_GET%5B%22PropertyName">http://localhost:8008/mapguide/test/KMLContentFactory.php?FILTER=FID&gt;0</a><br>
<br>
Where FID is an existing numeric column.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
鞠斌 skrev:
<blockquote cite="mid:tencent_50EAE0DF177046BE01C7FA3C@qq.com"
 type="cite">
  <div>my codes is from&nbsp; the <a moz-do-not-send="true"
 href="http://mapguide.osgeo.org/livegallery.html">http://mapguide.osgeo.org/livegallery.html</a>&nbsp;and
I want to do the same thing as <a moz-do-not-send="true"
 href="http://data.mapguide.com/mapguide/DynamicKml/GoogleEarth.php">http://data.mapguide.com/mapguide/DynamicKml/GoogleEarth.php</a> 
Ijust used their codes and use my data instead,but I can't get the
right result.</div>
  <div>If there is no BBOX,can I get the Geometry?</div>
  <div>the file which invoke that function is just as follows.</div>
  <div>&nbsp;</div>
  <div
 style="font-size: 12px; color: rgb(144, 144, 144); font-family: Arial Narrow;">------------------</div>
  <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; --鞠斌</p>
  </div>
  <div>&lt;?php</div>
  <div>&nbsp;//This file delivers KML network link content directly<br>
&nbsp;//to Google Earth.<br>
&nbsp;include 'UtilityFunctions.php';</div>
  <div>&nbsp;//uses the Wrapper.kml file for KML Network Link Skeleton<br>
&nbsp;$doc = DOMDocument::load('Wrapper.kml');<br>
&nbsp;$networkLinkNode = $doc-&gt;getElementsByTagName('href')-&gt;item(0);<br>
&nbsp;$networkLinkNode-&gt;nodeValue = "<a moz-do-not-send="true"
 href="http://localhost:8008/mapguide/test/KMLContentFactory.php?FILTER=%22.urlencode%28$_GET%5B%22PropertyName">http://localhost:8008/mapguide/test/KMLContentFactory.php?FILTER=".urlencode($_GET["PropertyName</a>"]."
".$_GET["Operator"]." ".$_GET["VAL"]);<br>
&nbsp;<br>
&nbsp;$layerDefinition = $doc-&gt;saveXML();<br>
&nbsp;header('Content-Type: application/keyhole');<br>
&nbsp;header('Content-Length: ' . strlen($layerDefinition));</div>
  <div>&nbsp;echo $layerDefinition;</div>
  <div>?&gt;<br>
  </div>
  <div>&nbsp;</div>
  <div
 style="padding: 2px 0px; font-size: 12px; font-family: Arial Narrow;">--
----------------&nbsp;原始邮件&nbsp;------------------</div>
  <div style="font-size: 12px;">
  <div id="menu_sender"><b>发件人:</b>&nbsp;"Kenneth Skovhede, GEOGRAF
A/S"<a class="moz-txt-link-rfc2396E" href="mailto:ks@geograf.dk">&lt;ks@geograf.dk&gt;</a>;</div>
  <div><b>发送时间:</b>&nbsp;2008年5月28日(星期三) 下午03:56</div>
  <div><b>收件人:</b>&nbsp;"MapGuide Users Mail
List"<a class="moz-txt-link-rfc2396E" href="mailto:mapguide-users@lists.osgeo.org">&lt;mapguide-users@lists.osgeo.org&gt;</a>; </div>
  <div><b>主题:</b>&nbsp;Re: [ZS2] [mapguide-users] What happens if the BBOX
does not exist?</div>
  </div>
  <div>&nbsp;</div>
  <div style="font-weight: normal;">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; $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; {<br>
&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; $coords = preg_split('/,|\s/', $_GET['BBOX']);<br>
&nbsp; &nbsp; &nbsp; &nbsp; $lowerLeft =
$geometryFactory-&gt;CreateCoordinateXY($coords[0], $coords[1]);<br>
&nbsp; &nbsp; &nbsp; &nbsp; $upperRight =
$geometryFactory-&gt;CreateCoordinateXY($coords[2], $coords[3]);<br>
    <br>
&nbsp; &nbsp; &nbsp; &nbsp; $queryEnvelope = new MgEnvelope($lowerLeft, $upperRight);<br>
&nbsp; &nbsp; }<br>
    <br>
$featureService =
$siteConnection-&gt;CreateService(MgServiceType::FeatureService);<br>
&nbsp; &nbsp; $queryOptions = new MgFeatureQueryOptions();<br>
    <br>
&nbsp; &nbsp; $filter = urldecode($_GET["FILTER"]) ;<br>
&nbsp; &nbsp; //echo "&lt;p&gt;$filter&lt;/p&gt;";<br>
&nbsp; &nbsp; echo '&lt;Folder&gt;';<br>
&nbsp; &nbsp; echo '&lt;description&gt;MapGuide - Wheaton Parcels Filtered
['.$filter.'] &lt;/description&gt;';<br>
&nbsp; &nbsp; echo '&lt;name&gt;Wheaton Parcels&lt;/name&gt;';<br>
&nbsp; &nbsp; echo '&lt;visibility&gt;0&lt;/visibility&gt;';<br>
&nbsp; &nbsp; echo '&lt;open&gt;1&lt;/open&gt;';<br>
    <br>
&nbsp; &nbsp; $queryOptions-&gt;SetFilter($filter);<br>
&nbsp; &nbsp; //Feature Source being used in the application<br>
&nbsp; &nbsp; $featureReader = $featureService-&gt;SelectFeatures(new
MgResourceIdentifier("Library://test/Data/province.FeatureSource"),
"province", $queryOptions);<br>
&nbsp; &nbsp; //if($featureReader!=null) echo "&lt;p&gt;feature
success!&lt;/p&gt;";<br>
&nbsp; &nbsp; $geometryReaderWriter = new MgAgfReaderWriter();<br>
&nbsp; &nbsp; echo '&lt;p&gt;test1&lt;/p&gt;';<br>
&nbsp; &nbsp; //Read Feature Source Attributes for populating Tooltip on Google
Earth<br>
&nbsp; &nbsp; //Change this if using a different Feature Source<br>
&nbsp; &nbsp; $byteReader = $featureReader-&gt;GetGeometry('Geometry');<br>
&nbsp; &nbsp; //if($byteReader) echo '&lt;p&gt;feature success!&lt;/p&gt;';<br>
&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; <br>
    </p>
    </div>
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" 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>
  </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>