<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY style="FONT: 10pt Courier New; COLOR: #000000" leftMargin=5 topMargin=5>
<DIV style="FONT: 10pt Courier New; COLOR: #000000">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Thanks Andy!</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I had
already tried this, without success.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">But I
found the error:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">When
I change “Key” to “Autogenerated_SDF_ID”, it
works:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB">Select</SPAN><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB">
<SPAN style="COLOR: blue">Case</SPAN> features.GetPropertyType(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Case</SPAN>
MgPropertyType.Int32<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdInt32(layer, featureClassName,
features.GetInt32(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Case</SPAN>
MgPropertyType.String<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdString(layer, featureClassName,
features.GetString(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Select<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: EN-GB"><SPAN
style="mso-spacerun: yes">
</SPAN></SPAN><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">End</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN
style="COLOR: blue">If</SPAN></SPAN><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P></DIV>
<DIV style="FONT: 10pt Courier New; COLOR: #000000"> </DIV>
<DIV style="FONT: 10pt Courier New; COLOR: #000000"> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<TABLE id=tobit_repfor
style="BORDER-RIGHT: #e0e0e0 1px solid; BORDER-TOP: #e0e0e0 1px solid; FONT: 10pt Arial; BORDER-LEFT: #e0e0e0 1px solid; COLOR: black; BORDER-BOTTOM: 0px"
cellSpacing=0 cols=3 cellPadding=0 width="99%" border=0>
<TBODY>
<TR borderColor=#dfdfdf borderColorLight=#dfdfdf bgColor=#dfdfdf>
<TD
style="PADDING-LEFT: 4px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px; BORDER-BOTTOM: #ffffff 1px solid"
width=140 colSpan=2 height=22>
<DIV style="FONT: bold 9pt Arial">Original
Message </DIV></TD>
<TD style="BORDER-BOTTOM: #ffffff 1px solid" align=right>
<DIV style="FONT: 8pt Arial">
<DIV style="FONT: 8pt Arial"><STRONG><FONT
color=#808080> processed by David
InfoCenter</FONT></STRONG> </DIV></DIV></TD></TR></TBODY></TABLE>
<TABLE id=tobit_repfor2
style="BORDER-RIGHT: #e0e0e0 1px solid; BORDER-TOP: 0px; FONT: 8pt Tahoma; BORDER-LEFT: #e0e0e0 1px solid; COLOR: black; BORDER-BOTTOM: #e0e0e0 1px solid"
cellSpacing=0 cols=2 cellPadding=0 width="99%" border=0>
<TBODY>
<TR style="PADDING-BOTTOM: 2px">
<TD style="PADDING-LEFT: 6px; BORDER-BOTTOM: #ffffff 1px solid" width=68
bgColor=#efefef height=18>
<DIV style="FONT: 8pt Tahoma">Subject: </DIV></TD>
<TD style="PADDING-LEFT: 4px; BORDER-BOTTOM: #efefef 1px solid"
bgColor=#ffffff>
<DIV style="FONT: 8pt Tahoma">RE: [mapguide-users] Selection and Zoom
Problem (08-Nov-2006 17:31)</DIV></TD></TR>
<TR style="PADDING-BOTTOM: 2px">
<TD style="PADDING-LEFT: 6px; BORDER-BOTTOM: #ffffff 1px solid" width=68
bgColor=#efefef height=18>
<DIV style="FONT: 8pt Tahoma">From: </DIV></TD>
<TD style="PADDING-LEFT: 4px; BORDER-BOTTOM: #efefef 1px solid"
bgColor=#ffffff>
<DIV style="FONT: 8pt Tahoma"><A
href="mailto:amorsell@spatialgis.com">Andy Morsell
<amorsell@spatialgis.com></A></DIV></TD></TR>
<TR style="PADDING-BOTTOM: 0px">
<TD style="PADDING-LEFT: 6px" width=68 bgColor=#efefef height=17>
<DIV
style="FONT: 8pt Tahoma">To: </DIV></TD>
<TD style="PADDING-LEFT: 4px" bgColor=#ffffff>
<DIV style="FONT: 8pt Tahoma"><A
href="mailto:m.roth@gds-team.de">m.roth@gds-team.de</A></DIV></TD></TR></TBODY></TABLE>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=734412516-08112006>Try saving the
selection object to the server after you build it. Something
like:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=734412516-08112006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN
class=734412516-08112006>Selection.Save(resourceService, mapname)</SPAN></DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face=Tahoma size=1>Andy Morsell, P.E.</FONT></SPAN>
<BR><SPAN lang=en-us><FONT face=Tahoma size=1>Spatial Integrators,
Inc.</FONT></SPAN> <BR><SPAN lang=en-us><FONT face=Tahoma size=1><A
href="http://www.spatialgis.com/">http://www.SpatialGIS.com</A></FONT></SPAN>
</P>
<DIV>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Markus Roth [mailto:m.roth@gds-team.de]
<BR><B>Sent:</B> Wednesday, November 08, 2006 5:55 AM<BR><B>To:</B>
users@mapguide.osgeo.org<BR><B>Subject:</B> [mapguide-users] Selection and
Zoom Problem<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Hello,</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>I have a problem with selections. In my .aspx<SPAN
style="mso-spacerun: yes"> </SPAN>(VB) site I generate the selection
string for the javascript. This works fine, but the feature is not highlighted
and no properties are shown in the Properties frame!?! But in the statusbar
the Info is shown that 1 feature is selected. I only use one layer that is
based on sdf file.</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>When I push the Button „Zoom to selection“ after one feature is
selected, the map always zooms to coordinates X: 0.0 ; Y: 0.0!</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Has anyone an idea what is wrong?</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>This is a sample of a generated selection string:</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3><?xml version="1.0" encoding="UTF-8"?><FeatureSet
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer
id="e82e9c52-ffff-ffff-8000-000cf1ae97f8"><SPAN
style="mso-spacerun: yes"> </SPAN><Class
id="SDF_2_Schema:sp_Lieg_flurstueck_F"><SPAN
style="mso-spacerun: yes">
</SPAN><ID>MTc2MQA=</ID><SPAN style="mso-spacerun: yes">
</SPAN></Class> </Layer></FeatureSet></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Here is my code:</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Code from aspx.vb site:</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">Private</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN
style="COLOR: blue">Function</SPAN> SelectionOb(<SPAN
style="COLOR: blue">ByVal</SPAN> Filter <SPAN style="COLOR: blue">As</SPAN>
<SPAN style="COLOR: blue">String</SPAN>, <SPAN
style="COLOR: blue">ByVal</SPAN> LayerName <SPAN style="COLOR: blue">As</SPAN>
<SPAN style="COLOR: blue">String</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>MapGuideApi.MgInitializeWebTier(<SPAN style="COLOR: maroon">"… Path to
webconfig.ini"</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> userInfo <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">New</SPAN>
MgUserInformation(sessionID)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> siteConnection <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">New</SPAN>
MgSiteConnection()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>siteConnection.Open(userInfo)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">Dim</SPAN> resourceService <SPAN
style="COLOR: blue">As</SPAN> MgResourceService =
siteConnection.CreateService(MgServiceType.ResourceService)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> featureService <SPAN
style="COLOR: blue">As</SPAN> MgFeatureService =
siteConnection.CreateService(MgServiceType.FeatureService)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> renderingService <SPAN
style="COLOR: blue">As</SPAN> MgRenderingService =
siteConnection.CreateService(MgServiceType.RenderingService)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> MapDefID <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">New</SPAN>
MgResourceIdentifier(mapDefinition)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> Map <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">New</SPAN>
MgMap()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> mapname <SPAN
style="COLOR: blue">As</SPAN> <SPAN
style="COLOR: blue">String<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>mapname = MapDefID.GetName()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Map.Open(resourceService, mapname)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> layers <SPAN
style="COLOR: blue">As</SPAN> MgLayerCollection =
Map.GetLayers()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> layer <SPAN
style="COLOR: blue">As</SPAN> MgLayer<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> layername1 <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">String</SPAN> = <SPAN
style="COLOR: maroon">""<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> i <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">Integer</SPAN> =
0<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Do</SPAN> <SPAN
style="COLOR: blue">Until</SPAN> layername1 = LayerName<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>layer = layers.GetItem(i)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>layername1 = layer.GetName()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>i += 1<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Loop<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">'##<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> query <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">New</SPAN>
MgFeatureQueryOptions()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>query.SetFilter(Filter)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> featureClassName <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">String</SPAN> =
layer.GetFeatureClassName()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> featureSource <SPAN
style="COLOR: blue">As</SPAN> MgResourceIdentifier = <SPAN
style="COLOR: blue">New</SPAN>
MgResourceIdentifier(layer.GetFeatureSourceId())<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> features <SPAN
style="COLOR: blue">As</SPAN> MgFeatureReader =
featureService.SelectFeatures(featureSource, featureClassName,
query)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> hasResult <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">Boolean</SPAN> =
features.ReadNext()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Dim</SPAN> Selection <SPAN
style="COLOR: blue">As</SPAN> MgSelection = <SPAN
style="COLOR: blue">New</SPAN> MgSelection(Map)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Select</SPAN> <SPAN
style="COLOR: blue">Case</SPAN> features.GetPropertyType(<SPAN
style="COLOR: maroon">"Key"</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">Case</SPAN> MgPropertyType.Int32<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdInt32(layer, featureClassName,
features.GetInt32(<SPAN
style="COLOR: maroon">"Key"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Case</SPAN>
MgPropertyType.String<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdString(layer, featureClassName,
features.GetString(<SPAN
style="COLOR: maroon">"Key"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Select<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>selectiontext = Selection.ToXml()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>TextBox1.Text = selectiontext<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>layer.ForceRefresh()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Map.Save(resourceService)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>features.Close()<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>query = <SPAN
style="COLOR: blue">Nothing<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Catch</SPAN> ex <SPAN
style="COLOR: blue">As</SPAN> Exception<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Label1.Text = ex.ToString<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Try<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Function<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>The javascript:</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT
face="Times New Roman" size=3> </FONT></o:p></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">function</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
Select(){<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">var</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
seltext = <SPAN style="COLOR: maroon">'<%=selectiontext
%>'</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">parent.parent.mapFrame.SetSelectionXML(seltext);<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}</SPAN></P></DIV></BLOCKQUOTE></BODY></HTML>