<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=utf-8">
<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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>You’re idea helped me get over one obstacle, but I now seem
to have one more. Below is my code from Deafult.aspx.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><span style='background:yellow;mso-highlight:yellow'><%</span><span
style='color:blue'>@</span> <span style='color:#A31515'>Page</span> <span
style='color:red'>Language</span><span style='color:blue'>="c#"</span>
<span style='color:red'>Debug</span><span style='color:blue'>="true"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="OSGeo.MapGuide"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="System"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="System.Text"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="System.IO"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="System.Collections.Specialized"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>MapGuideApi</span><span
style='font-size:10.0pt;font-family:"Courier New"'>.MgInitializeWebTier(<span
style='color:#A31515'>@"C:\Program
Files\Autodesk\MapGuideEnterprise2008\WebServerExtensions\www\webconfig.ini"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>MgUserInformation</span><span
style='font-size:10.0pt;font-family:"Courier New"'> userInfo = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgUserInformation</span>(<span
style='color:#A31515'>"Administrator"</span>, <span style='color:
#A31515'>"admin"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>MgSite</span><span style='font-size:
10.0pt;font-family:"Courier New"'> site = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>MgSite</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>site.Open(userInfo);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>String</span><span style='font-size:
10.0pt;font-family:"Courier New"'> sessionId = site.CreateSession();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>String</span><span style='font-size:
10.0pt;font-family:"Courier New"'> webLayout = <span style='color:#A31515'>"Library://DevTV/HelloWorld.WebLayout"</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#2B91AF'>Globals</span><span style='font-size:
10.0pt;font-family:"Courier New"'>.gSessionID = sessionId; <span
style='color:green'>//Holds my session ID value<o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:green'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><!</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>DOCTYPE</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>html</span> <span
style='color:red'>PUBLIC</span> <span style='color:blue'>"-//W3C//DTD
XHTML 1.0 Transitional//EN"</span> <span style='color:blue'>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>html</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>body</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>iframe</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>id</span><span
style='color:blue'>="viewerFrame"</span> <span style='color:red'>width</span><span
style='color:blue'>="100%"</span> <span style='color:red'>height</span><span
style='color:blue'>="1000px"</span> <span style='color:red'>src</span><span
style='color:blue'>="/mapguide2008/mapviewernet/ajaxviewer.aspx?SESSION=</span><span
style='background:yellow;mso-highlight:yellow'><%</span>=sessionId<span
style='background:yellow;mso-highlight:yellow'>%></span><span
style='color:blue'>&WEBLAYOUT=</span><span style='background:yellow;
mso-highlight:yellow'><%</span>=webLayout<span style='background:yellow;
mso-highlight:yellow'>%></span><span style='color:blue'>"</span><span
style='color:red'>onload</span><span style='color:blue'>="OnMapLoaded()"></></</span><span
style='color:#A31515'>iframe</span><span style='color:blue'>><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>iframe</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>style</span><span
style='color:blue'>="display: none"</span> <span style='color:red'>src</span><span
style='color:blue'>=""</span> <span style='color:red'>id</span><span
style='color:blue'>="maploaded""></</span><span
style='color:#A31515'>iframe</span><span style='color:blue'>><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>script</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>function</span><span style='font-size:
10.0pt;font-family:"Courier New"'> OnMapLoaded()<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>{<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> document.getElementById(<span style='color:#A31515'>'maploaded'</span>).src
= <span style='color:#A31515'>'maploaded.aspx'</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>}<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>script</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>></span><span style='font-size:
10.0pt;font-family:"Courier New"'> <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>body</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'></</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#A31515'>html</span><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>></span><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Code in maploaded.aspx<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Page</span>
<span style='color:red'>Language</span><span style='color:blue'>="C#"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%</span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>@</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>Import</span>
<span style='color:red'>Namespace</span><span style='color:blue'>="OSGeo.MapGuide"</span>
<span style='background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>script</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>runat</span><span
style='color:blue'>="server"><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgGeometry</span>
getGeometry(<span style='color:#2B91AF'>String</span> district, <span
style='color:#2B91AF'>MgFeatureService</span> featureService)<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> {<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgFeatureQueryOptions</span>
districtQuery = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgFeatureQueryOptions</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> districtQuery.SetFilter(<span
style='color:#A31515'>"Autogenerated_SDF_ID = "</span> + district);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgResourceIdentifier</span>
districtId = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgResourceIdentifier</span>(<span
style='color:#A31515'>"Library://Samples/Sheboygan/Data/VotingDistricts.FeatureSource"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgFeatureReader</span>
featureReader = featureService.SelectFeatures(districtId, <span
style='color:#A31515'>"VotingDistricts"</span>, districtQuery);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> featureReader.ReadNext();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgByteReader</span>
geometryBytes = featureReader.GetGeometry(<span style='color:#A31515'>"Data"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgAgfReaderWriter</span>
agfReader = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgAgfReaderWriter</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgGeometry</span>
districtGeometry = agfReader.Read(geometryBytes);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'>return</span>
districtGeometry;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> }<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>script</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><%<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>String</span>
sessionId = <span style='color:#2B91AF'>Globals</span>.gSessionID; //Global
from Default.aspx<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>String</span> district
= <span style='color:#A31515'>"3"</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>String</span> name =
<span style='color:#A31515'>"ELSO"</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'>string</span> realPath
= Request.ServerVariables[<span style='color:#A31515'>"APPL_PHYSICAL_PATH"</span>];<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>String</span>
configPath = realPath + <span style='color:#A31515'>"webconfig.ini"</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MapGuideApi</span>.MgInitializeWebTier(configPath);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgUserInformation</span>
userInfo = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgUserInformation</span>(sessionId);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgSiteConnection</span>
siteConnection = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgSiteConnection</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> siteConnection.Open(userInfo);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgResourceService</span>
resService = (<span style='color:#2B91AF'>MgResourceService</span>)siteConnection.CreateService(<span
style='color:#2B91AF'>MgServiceType</span>.ResourceService);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgFeatureService</span>
featureService = (<span style='color:#2B91AF'>MgFeatureService</span>)siteConnection.CreateService(<span
style='color:#2B91AF'>MgServiceType</span>.FeatureService);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgMap</span> map = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgMap</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> map.Open(resService, <span style='color:#A31515'>"Sheboygan"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:green'>//Get Geometry object:
districtGeometry<o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgGeometry</span>
districtGeometry = getGeometry(district, featureService);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgFeatureQueryOptions</span>
nameQuery = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgFeatureQueryOptions</span>();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> nameQuery.SetFilter(<span style='color:#A31515'>"RNAME
LIKE '"</span> + name + <span style='color:#A31515'>"%'"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> nameQuery.SetSpatialFilter(<span
style='color:#A31515'>"SHPGEOM"</span>, districtGeometry, <span
style='color:#2B91AF'>MgFeatureSpatialOperations</span>.Inside);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgResourceIdentifier</span>
parcelId = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgResourceIdentifier</span>(<span
style='color:#A31515'>"Library://Samples/Sheboygan/Data/Parcels.FeatureSource"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgFeatureReader</span>
featureReader = featureService.SelectFeatures(parcelId, <span style='color:
#A31515'>"Parcels"</span>, nameQuery);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:green'>//Highlight the query
result on the map<o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgSelection</span>
selection = <span style='color:blue'>new</span> <span style='color:#2B91AF'>MgSelection</span>(map);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>MgLayer</span> layer
= (<span style='color:#2B91AF'>MgLayer</span>)map.GetLayers().GetItem(<span
style='color:#A31515'>"Parcels"</span>);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> featureReader =
featureService.SelectFeatures(parcelId, <span style='color:#A31515'>"Parcels"</span>,
nameQuery);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> selection.AddFeatures(layer, featureReader, 0);<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:#2B91AF'>String</span>
selectionXML = selection.ToXml();<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'>%><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";background:yellow;mso-highlight:yellow'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><!</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>DOCTYPE</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>html</span> <span
style='color:red'>PUBLIC</span> <span style='color:blue'>"-//W3C//DTD
XHTML 1.0 Transitional//EN"</span> <span style='color:blue'>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>html</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>xmlns</span><span
style='color:blue'>="http://www.w3.org/1999/xhtml"</span> <span
style='color:blue'>><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>head</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>runat</span><span
style='color:blue'>="server"><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'><</span><span
style='color:#A31515'>title</span><span style='color:blue'>></span>Untitled
Page<span style='color:blue'></</span><span style='color:#A31515'>title</span><span
style='color:blue'>><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>head</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>script</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:red'>type</span><span
style='color:blue'>="text/javascript"><o:p></o:p></span></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'>function</span>
onPageLoad() {<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'>var</span>
selectionXML = <span style='color:#A31515'>'<%= selectionXML %>'</span>;<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> parent.SetSelectionXML(selectionXML); <o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> }<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'> <span style='color:blue'></</span><span
style='color:#A31515'>script</span><span style='color:blue'>><o:p></o:p></span></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'></</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#A31515'>html</span><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>></span><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>When the map comes up, nothing is selected…..you’ve been
such a “HUGE” help, could you review what I have and give me you opinion please…many
thanks.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>Nick Aizen<o:p></o:p></b></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>