<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:"Calibri","sans-serif";
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 –
why doesn’t Mapguide and fusion have it out of the box? <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </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:
"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;
font-family:"Tahoma","sans-serif""> 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> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Padmini..<br>
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 <<a href="mailto:godavarthi.padmini@gmail.com">godavarthi.padmini@gmail.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal"><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 = "";<br>
foreach (String str in serverVars.AllKeys)<br>
{<br>
<br>
strServerVars += "<br>" + str;<br>
<br>
}<br>
String platform = serverVars["SERVER_SOFTWARE"];<br>
String queryStr = serverVars["QUERY_STRING"];<br>
string queryStr1 = serverVars["Form"];<br>
NameValueCollection requestParams = Request.HttpMethod == "POST" ?<br>
Request.Form : Request.QueryString;<br>
String sessionId = Request.QueryString["SESSION"];<br>
//String sessionId = Request.QueryString["SESSION"]; ;<br>
<br>
string realPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];<br>
String configPath = realPath + "webconfig.ini";<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, "oramap");<br>
<br>
<br>
MgFeatureQueryOptions nameQuery = new MgFeatureQueryOptions();<br>
<br>
//nameQuery.SetFilter(ConfigurationManager.AppSettings["FieldToFilter"] +<br>
"=" + Globals.gURLParam);<br>
nameQuery.SetFilter("PARCEL_ID" + "=" + "670_111");<br>
MgResourceIdentifier parcelId = new<br>
MgResourceIdentifier("Library://Orasample/resora.FeatureSource");<br>
MgFeatureReader featureReader =<br>
featureService.SelectFeatures(parcelId, "GEOM_TABLE", nameQuery);<br>
<br>
//Highlight the query result on the map<br>
MgSelection selection = new MgSelection(map);<br>
MgLayer layer = (MgLayer)map.GetLayers().GetItem("GEOM_TABLE");<br>
<br>
<br>
featureReader = featureService.SelectFeatures(parcelId,<br>
"GEOM_TABLE", nameQuery);<br>
selection.AddFeatures(layer, featureReader, 0);<br>
String selectXML = selection.ToXml();<br>
selection.Save(resService, "oramap");<br>
Page.ClientScript.RegisterStartupScript(Page.GetType(), "test",<br>
"select('" + selectXML + "');", true);<br>
}<br>
<br>
but i got an error at<br>
<br>
MgFeatureReader featureReader = featureService.SelectFeatures(parcelId,<br>
"GEOM_TABLE", 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 & 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>