<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" 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 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I need to iterate through the current map selection.
However, the line mapSelection.open() gives the following error:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Does anyone know how to solve this problem?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><b><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial;font-weight:bold'>Generated servlet error:<o:p></o:p></span></font></b></p>
<p class=MsoNormal><b><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial;font-weight:bold'>The method open(MgResourceService, String)
is undefined for the type MgSelection<o:p></o:p></span></font></b></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>My code:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>MgResourceService
resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:1.0in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>MgMap map = new MgMap();<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> map.Open(resourceService,
"Map");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> MgSelection
mapSelection = new MgSelection(map);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>
<b><font color="#993300"><span style='color:#993300;font-weight:bold'>mapSelection.open(resourceService,
“Map”);<o:p></o:p></span></font></b></span></font></p>
<p class=MsoNormal><b><font size=2 color="#993300" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#993300;font-weight:bold'><o:p> </o:p></span></font></b></p>
<p class=MsoNormal><b><font size=2 color="#993300" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#993300;font-weight:bold'><o:p> </o:p></span></font></b></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The definition for this method is: <o:p></o:p></span></font></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0>
<tr>
<td nowrap valign=top style='padding:0in 0in 0in 0in'>
<p class=MsoNormal align=right style='text-align:right'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>virtual void <o:p></o:p></span></font></p>
</td>
<td valign=bottom style='padding:0in 0in 0in 0in'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><a
href="https://mapguide.osgeo.org/nonav/docs/webapi/d7/d8d/class_mg_selection_c068d4f8815e003a4650cbea9c32bc00.html#c068d4f8815e003a4650cbea9c32bc00">Open</a>
(<a
href="https://mapguide.osgeo.org/nonav/docs/webapi/d8/de1/class_mg_resource_service.html">MgResourceService</a>
*resourceService, <a
href="https://mapguide.osgeo.org/nonav/docs/webapi/da/d10/_common_defs_8h_2697935ae7be4121104b37ff513b810b.html#2697935ae7be4121104b37ff513b810b">CREFSTRING</a>
mapName)<o:p></o:p></span></font></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><b><font size=2 color="#993300" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#993300;font-weight:bold'><o:p> </o:p></span></font></b></p>
<p class=MsoNormal><font size=2 color="#993300" face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:#993300'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Regards<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Farah<o:p></o:p></span></font></p>
</div>
</body>
</html>