<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>&nbsp;</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'>&lt;%</span><span
style='color:blue'>@</span> <span style='color:#A31515'>Page</span> <span
style='color:red'>Language</span><span style='color:blue'>=&quot;c#&quot;</span>
<span style='color:red'>Debug</span><span style='color:blue'>=&quot;true&quot;</span> 
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;OSGeo.MapGuide&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;System&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;System.Text&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;System.IO&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;System.Collections.Specialized&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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>&nbsp;</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>&nbsp;</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'>&lt;%<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'>@&quot;C:\Program
Files\Autodesk\MapGuideEnterprise2008\WebServerExtensions\www\webconfig.ini&quot;</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'>&quot;Administrator&quot;</span>, <span style='color:
#A31515'>&quot;admin&quot;</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'>&quot;Library://DevTV/HelloWorld.WebLayout&quot;</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>&nbsp;</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'>%&gt;<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>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;!</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'>&quot;-//W3C//DTD
XHTML 1.0 Transitional//EN&quot;</span> <span style='color:blue'>&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<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'>&lt;</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'>&gt;<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'>&lt;</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'>&gt;<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'>&lt;</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'>=&quot;viewerFrame&quot;</span>  <span style='color:red'>width</span><span
style='color:blue'>=&quot;100%&quot;</span> <span style='color:red'>height</span><span
style='color:blue'>=&quot;1000px&quot;</span> <span style='color:red'>src</span><span
style='color:blue'>=&quot;/mapguide2008/mapviewernet/ajaxviewer.aspx?SESSION=</span><span
style='background:yellow;mso-highlight:yellow'>&lt;%</span>=sessionId<span
style='background:yellow;mso-highlight:yellow'>%&gt;</span><span
style='color:blue'>&amp;WEBLAYOUT=</span><span style='background:yellow;
mso-highlight:yellow'>&lt;%</span>=webLayout<span style='background:yellow;
mso-highlight:yellow'>%&gt;</span><span style='color:blue'>&quot;</span><span
style='color:red'>onload</span><span style='color:blue'>=&quot;OnMapLoaded()&quot;&gt;&lt;/&gt;&lt;/</span><span
style='color:#A31515'>iframe</span><span style='color:blue'>&gt;<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'>&lt;</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'>=&quot;display: none&quot;</span> <span style='color:red'>src</span><span
style='color:blue'>=&quot;&quot;</span> <span style='color:red'>id</span><span
style='color:blue'>=&quot;maploaded&quot;&quot;&gt;&lt;/</span><span
style='color:#A31515'>iframe</span><span style='color:blue'>&gt;<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'>&lt;</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'>&gt;<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'>&lt;/</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'>&gt;</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'>&lt;/</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'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&lt;/</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'>&gt;</span><o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Code in maploaded.aspx<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</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'>&lt;%</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'>=&quot;C#&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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'>&lt;%</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'>=&quot;OSGeo.MapGuide&quot;</span>
<span style='background:yellow;mso-highlight:yellow'>%&gt;<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>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;</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'>=&quot;server&quot;&gt;<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'>&quot;Autogenerated_SDF_ID = &quot;</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'>&quot;Library://Samples/Sheboygan/Data/VotingDistricts.FeatureSource&quot;</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'>&quot;VotingDistricts&quot;</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'>&quot;Data&quot;</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'>&lt;/</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'>&gt;<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>&nbsp;</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'>&lt;%<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'>&quot;3&quot;</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'>&quot;ELSO&quot;</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>&nbsp;</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'>&quot;APPL_PHYSICAL_PATH&quot;</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'>&quot;webconfig.ini&quot;</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'>&quot;Sheboygan&quot;</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'>&quot;RNAME
LIKE '&quot;</span> + name + <span style='color:#A31515'>&quot;%'&quot;</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'>&quot;SHPGEOM&quot;</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'>&quot;Library://Samples/Sheboygan/Data/Parcels.FeatureSource&quot;</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'>&quot;Parcels&quot;</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'>&quot;Parcels&quot;</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'>&quot;Parcels&quot;</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'>%&gt;<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>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;!</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'>&quot;-//W3C//DTD
XHTML 1.0 Transitional//EN&quot;</span> <span style='color:blue'>&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<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'>&lt;</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'>=&quot;http://www.w3.org/1999/xhtml&quot;</span> <span
style='color:blue'>&gt;<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'>&lt;</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'>=&quot;server&quot;&gt;<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'>&lt;</span><span
style='color:#A31515'>title</span><span style='color:blue'>&gt;</span>Untitled
Page<span style='color:blue'>&lt;/</span><span style='color:#A31515'>title</span><span
style='color:blue'>&gt;<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'>&lt;/</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'>&gt;<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'>&lt;</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'>=&quot;text/javascript&quot;&gt;<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'>'&lt;%= selectionXML %&gt;'</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'>&lt;/</span><span
style='color:#A31515'>script</span><span style='color:blue'>&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&lt;/</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'>&gt;</span><o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</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>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><b>Nick Aizen<o:p></o:p></b></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>