<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Just create a new one:<br>
ServerConnectionI con;<br>
MgSiteConnection siteConnection = new MgSiteConnection();<br>
siteConnection.Open(new MgUserInformation(con.SessionID));<br>
<br>
I don't have an example for using Xml manually.<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:ravinder.singh@BIRLASOFT.COM">ravinder.singh@BIRLASOFT.COM</a> skrev:
<blockquote
 cite="mid:176511108BBB7842992F0BF7B56EB6180665813D@INNOIDA.BIRLASOFT.COM"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Mangal;
        panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Book Antiqua";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Book Antiqua";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.google-src-text1
        {display:none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
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]-->
  </o:SmartTagType>
  <div class="Section1">
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">Hi,<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">Ok
Fine.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">If
I want to use
MgSelcetion then I have a problem.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">How
can I use
the MgSelection wth the map created at run time?<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">Because
when I write
the below code<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">MgMap map = new
MgMap
(siteConnection);</span> <br>
  <span class="google-src-text1"><span
 style="background: rgb(230, 236, 249) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><span
 onmouseover="_tipon(this)" onmouseout="_tipoff()">map.Open(mgMapName);</span></span><span
 style="background: rgb(230, 236, 249) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
map.Open (mgMapName);</span></span></font><font color="blue"
 face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;"><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;">Then
siteConnection
will be of type </span></font><font face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">MgSiteConnection
&amp; we don&#8217;t
have this connection because we have used Meastro API, where we have </span></font><font
 color="teal" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: teal;">ServerConnectionI.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="teal" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: teal;">So,
how can I pass
my connection of ServerConenctionI type to MgMap Constructor which
takes </span></font><font face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">MgSiteConnection
Type?<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">And the second
method (xml
manually), you suggested I just need some example because it&#8217;s not
cleared to me.</span></font><font color="teal" face="Book Antiqua"
 size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: teal;"><o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="blue" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: blue;"><o:p>&nbsp;</o:p></span></font></p>
  <div>
  <p class="MsoNormal"><b><font color="gray" face="Book Antiqua"
 size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: gray; font-weight: bold;">Thanks
&amp; Regards,<o:p></o:p></span></font></b></p>
  <p class="MsoNormal"><font color="gray" face="Times New Roman"
 size="2"><span style="font-size: 11pt; color: gray;">Ravinder</span></font><font
 color="#c41230" face="Book Antiqua" size="1"><span
 style="font-size: 9pt; font-family: &quot;Book Antiqua&quot;; color: rgb(196, 18, 48);">
  </span></font><font color="gray" size="2"><span
 style="font-size: 11pt; color: gray;"><o:p></o:p></span></font></p>
  </div>
  <div>
  <div class="MsoNormal" style="text-align: center;" align="center"><font
 color="black" face="Times New Roman" size="3"><span
 style="font-size: 12pt; color: windowtext;">
  <hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
  <p class="MsoNormal"><b><font color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
 color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] <b><span
 style="font-weight: bold;">On Behalf Of </span></b>Kenneth Skovhede,
GEOGRAF A/S<br>
  <b><span style="font-weight: bold;">Sent:</span></b> Saturday,
February 21, 2009
4:44 PM<br>
  <b><span style="font-weight: bold;">To:</span></b> <st1:PersonName
 w:st="on">MapGuide Users Mail List</st1:PersonName><br>
  <b><span style="font-weight: bold;">Subject:</span></b> Re:
[mapguide-users]
Regarding Selection of features of layer linkedwth map by Maestro API</span></font><font
 color="black"><span style="color: windowtext;"><o:p></o:p></span></font></p>
  </div>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">There is currently no methods
for dealing with
selections through the MaestroAPI,<br>
so you have to use the MgSelection object from the regular API.<br>
  <br>
An alternative is to just deal with the xml manually.<br>
It looks like this:<br>
&lt;FeatureSet&gt;<br>
&nbsp; &lt;Layer id="layer guid"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;Class id="schema name"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ID&gt;base64 encoded id&lt;/ID&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ID&gt;...&lt;/ID&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/Class&gt;<br>
&nbsp; &lt;/Layer&gt;<br>
&lt;/FeatureSet&gt;<br>
  <br>
There can be multiple layers in the selection.<br>
  <br>
I have added a ticket you can subscribe to, if you want to track my
progress on
making the selection easier in the MaestroAPI:<br>
  <a moz-do-not-send="true"
 href="http://trac.osgeo.org/mapguide/ticket/858">http://trac.osgeo.org/mapguide/ticket/858</a><br>
  <br>
  <o:p></o:p></span></font></p>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Regards, Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></span></font></pre>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><br>
  <br>
  <a moz-do-not-send="true" href="mailto:ravinder.singh@BIRLASOFT.COM">ravinder.singh@BIRLASOFT.COM</a>
skrev: <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><!--[if gte mso 9]><xml>
 <u1:shapedefaults u2:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <u3:shapelayout u4:ext="edit">
  <u3:idmap u4:ext="edit" data="1"/>
 </u3:shapelayout>
</xml><![endif]-->Hi
All,<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><u5:p>&nbsp;</u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">I have
associated a layer
to a map at run time by using maestro api.<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">And I got the
prefect
output, map is rendering properly.<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><u5:p>&nbsp;</u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">But now I want
to
highlight/mark the features of layer, depending upon the condition
entered by
the user (for taking the input condition I have made my separate aspx
page).<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><u5:p>&nbsp;</u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">So my problem is
that how
to highlight/mark/select the features of the map/layer which I have
created at
run time by Maestro API.<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><u5:p>&nbsp;</u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;">I am using .net,
c#,
asp.net with MGOS<u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Book Antiqua" size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;;"><u5:p>&nbsp;</u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><b><font color="gray" face="Book Antiqua"
 size="2"><span
 style="font-size: 10pt; font-family: &quot;Book Antiqua&quot;; color: gray; font-weight: bold;">Thanks
&amp; Regards,<u5:p></u5:p></span></font></b><o:p></o:p></p>
  <p class="MsoNormal"><font color="gray" face="Times New Roman"
 size="2"><span style="font-size: 11pt; color: gray;">Ravinder <u5:p></u5:p></span></font><o:p></o:p></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><u5:p>&nbsp;</u5:p><o:p></o:p></span></font></p>
  <table class="MsoNormalTable" border="0" cellpadding="0">
    <tbody>
      <tr>
        <td
 style="padding: 0.75pt; background: white none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"
 bgcolor="white">
        <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">*********************************************************************************************************************************************************************<br>
"This message and any attachments are solely for the intended recipient
and may contain Birlasoft confidential or privileged information. If
you are not the intended recipient,any disclosure,copying, use, or
distribution of the information included in this message and any
attachments is <br>
prohibited. If you have received this communication in error, please
notify us by reply e-mail at (<a moz-do-not-send="true"
 href="mailto:administrator@birlasoft.com">administrator@birlasoft.com</a>)
and permanently delete this message and any attachments. Thank you."<br>
*********************************************************************************************************************************************************************<o:p></o:p></span></font></p>
        </td>
      </tr>
    </tbody>
  </table>
  <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p>&nbsp;</o:p></span></font></pre>
  <pre style="text-align: center;"><font color="black"
 face="Courier New" size="2"><span style="font-size: 10pt;">

<hr align="center" size="4" width="90%">

</span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p>&nbsp;</o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">mapguide-users mailing list<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a moz-do-not-send="true"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">&nbsp; <o:p></o:p></span></font></pre>
  </div>
  <pre>******************************************************************************************************************************
"This message and any attachments are solely for the intended recipient and may contain Birlasoft confidential or privileged information. If you are not the intended recipient,any disclosure,copying, use, or distribution of the information included in this message and any attachments is 
prohibited. If you have received this communication in error, please notify us by reply e-mail(<a class="moz-txt-link-abbreviated" href="mailto:administrator@birlasoft.com">administrator@birlasoft.com</a>) immediately and permanently delete this message and any attachments. Thank you."
************************************************************************************************************************************************************************
  </pre>
  <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>