Hi Padmini..<br>   In which file u wrote this code?or is it an in-built file?<br><br><div class="gmail_quote">On Thu, Dec 18, 2008 at 3:52 PM, padmini godavarthi <span dir="ltr">&lt;<a href="mailto:godavarthi.padmini@gmail.com">godavarthi.padmini@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Hi,<br>
Iam using Mapguide Opensource 2.0 (with .net 2.0 +IIS 5.1)<br>
<br>
I want to query the parcel_id and zoomed it on the map<br>
<br>
may code is<br>
<br>
<br>
       NameValueCollection serverVars = Request.ServerVariables;<br>
       String strServerVars = &quot;&quot;;<br>
       foreach (String str in serverVars.AllKeys)<br>
       {<br>
<br>
           strServerVars += &quot;&lt;br&gt;&quot; + str;<br>
<br>
       }<br>
       String platform = serverVars[&quot;SERVER_SOFTWARE&quot;];<br>
       String queryStr = serverVars[&quot;QUERY_STRING&quot;];<br>
       string queryStr1 = serverVars[&quot;Form&quot;];<br>
       NameValueCollection requestParams = Request.HttpMethod == &quot;POST&quot; ?<br>
Request.Form : Request.QueryString;<br>
       String sessionId = Request.QueryString[&quot;SESSION&quot;];<br>
       //String sessionId = Request.QueryString[&quot;SESSION&quot;]; ;<br>
<br>
       string realPath = Request.ServerVariables[&quot;APPL_PHYSICAL_PATH&quot;];<br>
       String configPath = realPath + &quot;webconfig.ini&quot;;<br>
       MapGuideApi.MgInitializeWebTier(configPath);<br>
<br>
       MgUserInformation userInfo = new MgUserInformation(sessionId);<br>
<br>
       MgSiteConnection siteConnection = new MgSiteConnection();<br>
       siteConnection.Open(userInfo);<br>
<br>
       MgResourceService resService =<br>
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);<br>
       MgFeatureService featureService =<br>
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);<br>
<br>
       MgMap map = new MgMap();<br>
       map.Open(resService, &quot;oramap&quot;);<br>
<br>
<br>
       MgFeatureQueryOptions nameQuery = new MgFeatureQueryOptions();<br>
<br>
//nameQuery.SetFilter(ConfigurationManager.AppSettings[&quot;FieldToFilter&quot;] +<br>
&quot;=&quot; + Globals.gURLParam);<br>
       nameQuery.SetFilter(&quot;PARCEL_ID&quot; + &quot;=&quot; + &quot;670_111&quot;);<br>
       MgResourceIdentifier parcelId = new<br>
MgResourceIdentifier(&quot;Library://Orasample/resora.FeatureSource&quot;);<br>
       MgFeatureReader featureReader =<br>
featureService.SelectFeatures(parcelId, &quot;GEOM_TABLE&quot;, nameQuery);<br>
<br>
       //Highlight the query result on the map<br>
       MgSelection selection = new MgSelection(map);<br>
       MgLayer layer = (MgLayer)map.GetLayers().GetItem(&quot;GEOM_TABLE&quot;);<br>
<br>
<br>
       featureReader = featureService.SelectFeatures(parcelId,<br>
&quot;GEOM_TABLE&quot;, nameQuery);<br>
       selection.AddFeatures(layer, featureReader, 0);<br>
     String selectXML = selection.ToXml();<br>
       selection.Save(resService, &quot;oramap&quot;);<br>
       Page.ClientScript.RegisterStartupScript(Page.GetType(), &quot;test&quot;,<br>
&quot;select(&#39;&quot; + selectXML + &quot;&#39;);&quot;, true);<br>
}<br>
<br>
but i got an error at<br>
<br>
  MgFeatureReader featureReader = featureService.SelectFeatures(parcelId,<br>
&quot;GEOM_TABLE&quot;, nameQuery);<br>
<br>
<br>
1)can u plz tell me what do u man by faeture class name?<br>
from where i will gt it?<br>
<br>
Thanks and Regards,<br>
Padmini.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Zoom-To-Selection-tp21070073p21070073.html" target="_blank">http://www.nabble.com/Zoom-To-Selection-tp21070073p21070073.html</a><br>
Sent from the MapGuide Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Nisha P<br>IIITM-K<br><a href="mailto:nisha@iiitmk.ac.in">nisha@iiitmk.ac.in</a><br>