hi all.....<br><br>       Anyone plzz help me to set the filter.I am having  a feature source with properties(pan_id,Name.,etc..).Now I wanna  select the polygon  from the map  having pan_id=ID.<br>The ID will be entered from the task pane. Here is my code:<br>
<br><b>I copied it from dev guide..Then what is this this&quot;SHPGEOM&quot; in setspatialfilter<br clear="all">
</b><br><br><br>&lt;?php<br>    include &#39;../common/common.php&#39;;<br><br>    $args = ($_SERVER[&#39;REQUEST_METHOD&#39;]==&quot;GET&quot;)? $_GET: $_POST;<br>     <br>    $sessionId = $args[&#39;SESSION&#39;];<br>    $mapName = $args[&#39;MAPNAME&#39;];<br>
    $ID= $_GET[&#39;PanId&#39;];<br>     <br><br>    try<br>    {<br><br>      // Initialize the Web Extensions and connect to the Server using<br>      // the Web Extensions session identifier stored in PHP session state.<br>
<br>      MgInitializeWebTier ($webconfigFilePath);<br><br>      $userInfo = new MgUserInformation($sessionId  );<br>      $siteConnection = new MgSiteConnection();<br>      $siteConnection-&gt;Open($userInfo);<br><br>      $map = new MgMap($siteConnection);<br>
      $map-&gt;Open( $mapName  );<br><br>      // Get the geometry for the boundaries of District <br><br>      $districtQuery = new MgFeatureQueryOptions();<br>     <b> $districtQuery-&gt;SetFilter(&quot;pan_id=$ID&quot;);</b><br>
<br>      $layer = $map-&gt;GetLayers()-&gt;GetItem(0);<br>      $featureReader = $layer-&gt;SelectFeatures($districtQuery);<br>      $featureReader-&gt;ReadNext();<br>      $districtGeometryData = $featureReader-&gt;<br>
      GetGeometry(&#39;Data&#39;);<br><br>      // Convert the AGF binary data to MgGeometry.<br><br>      $agfReaderWriter = new MgAgfReaderWriter();<br>      $districtGeometry = $agfReaderWriter-&gt;Read($districtGeometryData);<br>
<br>      // Create a filter to select the desired features. Combine<br>      // a basic filter and a spatial filter.<br><br>      $queryOptions = new MgFeatureQueryOptions();<br>      $<b>queryOptions-&gt;SetFilter(&quot;pan_id=$ID&quot;); <br>
      $queryOptions-&gt;SetSpatialFilter(&#39;SHPGEOM&#39;, $districtGeometry, MgFeatureSpatialOperations::Inside);<br></b><br>      // Get the features from the feature source,<br>      // turn it into a selection, then save the selection as XML.<br>
<br>      $layer = $map-&gt;GetLayers()-&gt;GetItem(0);<br>      $featureReader = $layer-&gt;SelectFeatures($queryOptions);<br><br>      $layer = $map-&gt;GetLayers()-&gt;GetItem(0);       <br>      $selection = new MgSelection($map);<br>
      $selection-&gt;AddFeatures($layer, $featureReader, 0);<br>      $selectionXml = $selection-&gt;ToXml();<br><br>       <br>    }<br>    catch (MgException $e)<br>    {<br>      echo $e-&gt;GetMessage();<br>      echo $e-&gt;GetDetails();<br>
    }<br>    ?&gt;<br><br>  &lt;/body&gt;<br><br>  &lt;script language=&quot;javascript&quot;&gt;<br> <br><br>    function OnPageLoad()<br>    {<br>      selectionXml = &#39;&lt;?php echo $selectionXml; ?&gt;&#39;;<br>      parent.parent.SetSelectionXML(selectionXml);<br>
    }<br><br>  &lt;/script&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br><br>-- <br> thanks&amp;regards<br>  susan<br>