<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-NZ" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">The capability to zoom to a feature (such as by clicking a feature in a list of features found by a search) should be a basic capability of a GIS system &#8211;
 why doesn&#8217;t Mapguide and fusion have it out of the box? &nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:
&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;
font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> mapguide-users-bounces@lists.osgeo.org [mailto:mapguide-users-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Nisha P<br>
<b>Sent:</b> Wednesday, 11 March 2009 11:17 p.m.<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> Re: [mapguide-users] Zoom To Selection<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Padmini..<br>
&nbsp;&nbsp; In which file u wrote this code?or is it an in-built file?<o:p></o:p></p>
<div>
<p class="MsoNormal">On Thu, Dec 18, 2008 at 3:52 PM, padmini godavarthi &lt;<a href="mailto:godavarthi.padmini@gmail.com">godavarthi.padmini@gmail.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
Hi,<br>
Iam using Mapguide Opensource 2.0 (with .net 2.0 &#43;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>
&nbsp; &nbsp; &nbsp; NameValueCollection serverVars = Request.ServerVariables;<br>
&nbsp; &nbsp; &nbsp; String strServerVars = &quot;&quot;;<br>
&nbsp; &nbsp; &nbsp; foreach (String str in serverVars.AllKeys)<br>
&nbsp; &nbsp; &nbsp; {<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strServerVars &#43;= &quot;&lt;br&gt;&quot; &#43; str;<br>
<br>
&nbsp; &nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp; String platform = serverVars[&quot;SERVER_SOFTWARE&quot;];<br>
&nbsp; &nbsp; &nbsp; String queryStr = serverVars[&quot;QUERY_STRING&quot;];<br>
&nbsp; &nbsp; &nbsp; string queryStr1 = serverVars[&quot;Form&quot;];<br>
&nbsp; &nbsp; &nbsp; NameValueCollection requestParams = Request.HttpMethod == &quot;POST&quot; ?<br>
Request.Form : Request.QueryString;<br>
&nbsp; &nbsp; &nbsp; String sessionId = Request.QueryString[&quot;SESSION&quot;];<br>
&nbsp; &nbsp; &nbsp; //String sessionId = Request.QueryString[&quot;SESSION&quot;]; ;<br>
<br>
&nbsp; &nbsp; &nbsp; string realPath = Request.ServerVariables[&quot;APPL_PHYSICAL_PATH&quot;];<br>
&nbsp; &nbsp; &nbsp; String configPath = realPath &#43; &quot;webconfig.ini&quot;;<br>
&nbsp; &nbsp; &nbsp; MapGuideApi.MgInitializeWebTier(configPath);<br>
<br>
&nbsp; &nbsp; &nbsp; MgUserInformation userInfo = new MgUserInformation(sessionId);<br>
<br>
&nbsp; &nbsp; &nbsp; MgSiteConnection siteConnection = new MgSiteConnection();<br>
&nbsp; &nbsp; &nbsp; siteConnection.Open(userInfo);<br>
<br>
&nbsp; &nbsp; &nbsp; MgResourceService resService =<br>
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);<br>
&nbsp; &nbsp; &nbsp; MgFeatureService featureService =<br>
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);<br>
<br>
&nbsp; &nbsp; &nbsp; MgMap map = new MgMap();<br>
&nbsp; &nbsp; &nbsp; map.Open(resService, &quot;oramap&quot;);<br>
<br>
<br>
&nbsp; &nbsp; &nbsp; MgFeatureQueryOptions nameQuery = new MgFeatureQueryOptions();<br>
<br>
//nameQuery.SetFilter(ConfigurationManager.AppSettings[&quot;FieldToFilter&quot;] &#43;<br>
&quot;=&quot; &#43; Globals.gURLParam);<br>
&nbsp; &nbsp; &nbsp; nameQuery.SetFilter(&quot;PARCEL_ID&quot; &#43; &quot;=&quot; &#43; &quot;670_111&quot;);<br>
&nbsp; &nbsp; &nbsp; MgResourceIdentifier parcelId = new<br>
MgResourceIdentifier(&quot;Library://Orasample/resora.FeatureSource&quot;);<br>
&nbsp; &nbsp; &nbsp; MgFeatureReader featureReader =<br>
featureService.SelectFeatures(parcelId, &quot;GEOM_TABLE&quot;, nameQuery);<br>
<br>
&nbsp; &nbsp; &nbsp; //Highlight the query result on the map<br>
&nbsp; &nbsp; &nbsp; MgSelection selection = new MgSelection(map);<br>
&nbsp; &nbsp; &nbsp; MgLayer layer = (MgLayer)map.GetLayers().GetItem(&quot;GEOM_TABLE&quot;);<br>
<br>
<br>
&nbsp; &nbsp; &nbsp; featureReader = featureService.SelectFeatures(parcelId,<br>
&quot;GEOM_TABLE&quot;, nameQuery);<br>
&nbsp; &nbsp; &nbsp; selection.AddFeatures(layer, featureReader, 0);<br>
&nbsp; &nbsp; String selectXML = selection.ToXml();<br>
&nbsp; &nbsp; &nbsp; selection.Save(resService, &quot;oramap&quot;);<br>
&nbsp; &nbsp; &nbsp; Page.ClientScript.RegisterStartupScript(Page.GetType(), &quot;test&quot;,<br>
&quot;select('&quot; &#43; selectXML &#43; &quot;');&quot;, true);<br>
}<br>
<br>
but i got an error at<br>
<br>
&nbsp;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>
<span style="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></span><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
Nisha P<br>
IIITM-K<br>
<a href="mailto:nisha@iiitmk.ac.in">nisha@iiitmk.ac.in</a><o:p></o:p></p>
</div>
<br>
<hr>
<font face="Verdana" color="Gray" size="2">Tonkin &amp; Taylor: Celebrating 50 years in 2009<br>
http://www.tonkin.co.nz<br>
</font><br>
<hr>
<font face="Arial" color="Gray" size="1">This email is only intended to be read by the named recipient. It may contain information that is confidential, proprietary or the subject of legal privilege. If you are not the intended recipient please notify the sender
 immediately and delete this email. You may not use any information contained in it. Legal privilege is not waived because you have read this email.<br>
</font>
</body>
</html>