<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I belive you must call Save on either the Selection or the Runtime map
(can't remember which).<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
Nick Aizen skrev:
<blockquote
cite="mid:C5302DE97C388A46AB9F6FA0B91AC81908DD459CEB@AUSP01VMBX01.collaborationhost.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<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]-->
<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=""><span
style="font-size: 10pt; font-family: "Courier New";"><span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="color: blue;">@</span> <span style="color: rgb(163, 21, 21);">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 none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="OSGeo.MapGuide"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="System"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="System.Text"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="System.IO"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="System.Collections.Specialized"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">MapGuideApi</span><span
style="font-size: 10pt; font-family: "Courier New";">.MgInitializeWebTier(<span
style="color: rgb(163, 21, 21);">@"C:\Program
Files\Autodesk\MapGuideEnterprise2008\WebServerExtensions\www\webconfig.ini"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">MgUserInformation</span><span
style="font-size: 10pt; font-family: "Courier New";"> userInfo = <span
style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgUserInformation</span>(<span
style="color: rgb(163, 21, 21);">"Administrator"</span>, <span
style="color: rgb(163, 21, 21);">"admin"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">MgSite</span><span
style="font-size: 10pt; font-family: "Courier New";"> site = <span
style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgSite</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">site.Open(userInfo);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">String</span><span
style="font-size: 10pt; font-family: "Courier New";"> sessionId =
site.CreateSession();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">String</span><span
style="font-size: 10pt; font-family: "Courier New";"> webLayout = <span
style="color: rgb(163, 21, 21);">"Library://DevTV/HelloWorld.WebLayout"</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(43, 145, 175);">Globals</span><span
style="font-size: 10pt; 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=""><span
style="font-size: 10pt; font-family: "Courier New"; color: green;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><!</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">DOCTYPE</span><span
style="font-size: 10pt; 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;"><a class="moz-txt-link-rfc2396E" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</a>><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">html</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">body</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">iframe</span><span
style="font-size: 10pt; 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 none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span>=sessionId<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%></span><span
style="color: blue;">&WEBLAYOUT=</span><span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span>=webLayout<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%></span><span
style="color: blue;">"</span><span style="color: red;">onload</span><span
style="color: blue;">="OnMapLoaded()"></></</span><span
style="color: rgb(163, 21, 21);">iframe</span><span
style="color: blue;">><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">iframe</span><span
style="font-size: 10pt; 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: rgb(163, 21, 21);">iframe</span><span
style="color: blue;">><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">script</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">function</span><span
style="font-size: 10pt; font-family: "Courier New";"> OnMapLoaded()<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">{<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
document.getElementById(<span style="color: rgb(163, 21, 21);">'maploaded'</span>).src
= <span style="color: rgb(163, 21, 21);">'maploaded.aspx'</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">}<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">script</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">></span><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">body</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">html</span><span
style="font-size: 10pt; 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=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Page</span>
<span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">@</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(163, 21, 21);">Import</span>
<span style="color: red;">Namespace</span><span style="color: blue;">="OSGeo.MapGuide"</span>
<span
style="background: yellow none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">script</span><span
style="font-size: 10pt; 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=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgGeometry</span>
getGeometry(<span style="color: rgb(43, 145, 175);">String</span>
district, <span style="color: rgb(43, 145, 175);">MgFeatureService</span>
featureService)<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> {<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgFeatureQueryOptions</span>
districtQuery = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgFeatureQueryOptions</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
districtQuery.SetFilter(<span style="color: rgb(163, 21, 21);">"Autogenerated_SDF_ID
= "</span> + district);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgResourceIdentifier</span>
districtId = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgResourceIdentifier</span>(<span
style="color: rgb(163, 21, 21);">"Library://Samples/Sheboygan/Data/VotingDistricts.FeatureSource"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgFeatureReader</span>
featureReader = featureService.SelectFeatures(districtId, <span
style="color: rgb(163, 21, 21);">"VotingDistricts"</span>,
districtQuery);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
featureReader.ReadNext();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgByteReader</span>
geometryBytes = featureReader.GetGeometry(<span
style="color: rgb(163, 21, 21);">"Data"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgAgfReaderWriter</span>
agfReader = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgAgfReaderWriter</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgGeometry</span>
districtGeometry = agfReader.Read(geometryBytes);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;">return</span>
districtGeometry;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> }<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">script</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><%<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">String</span>
sessionId = <span style="color: rgb(43, 145, 175);">Globals</span>.gSessionID;
//Global
from Default.aspx<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">String</span> district
= <span style="color: rgb(163, 21, 21);">"3"</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">String</span> name =
<span style="color: rgb(163, 21, 21);">"ELSO"</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;">string</span> realPath
= Request.ServerVariables[<span style="color: rgb(163, 21, 21);">"APPL_PHYSICAL_PATH"</span>];<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">String</span>
configPath = realPath + <span style="color: rgb(163, 21, 21);">"webconfig.ini"</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MapGuideApi</span>.MgInitializeWebTier(configPath);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgUserInformation</span>
userInfo = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgUserInformation</span>(sessionId);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgSiteConnection</span>
siteConnection = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgSiteConnection</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
siteConnection.Open(userInfo);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgResourceService</span>
resService = (<span style="color: rgb(43, 145, 175);">MgResourceService</span>)siteConnection.CreateService(<span
style="color: rgb(43, 145, 175);">MgServiceType</span>.ResourceService);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgFeatureService</span>
featureService = (<span style="color: rgb(43, 145, 175);">MgFeatureService</span>)siteConnection.CreateService(<span
style="color: rgb(43, 145, 175);">MgServiceType</span>.FeatureService);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgMap</span> map = <span
style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgMap</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
map.Open(resService, <span style="color: rgb(163, 21, 21);">"Sheboygan"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: green;">//Get Geometry object:
districtGeometry<o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgGeometry</span>
districtGeometry = getGeometry(district, featureService);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgFeatureQueryOptions</span>
nameQuery = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgFeatureQueryOptions</span>();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
nameQuery.SetFilter(<span style="color: rgb(163, 21, 21);">"RNAME
LIKE '"</span> + name + <span style="color: rgb(163, 21, 21);">"%'"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
nameQuery.SetSpatialFilter(<span style="color: rgb(163, 21, 21);">"SHPGEOM"</span>,
districtGeometry, <span style="color: rgb(43, 145, 175);">MgFeatureSpatialOperations</span>.Inside);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgResourceIdentifier</span>
parcelId = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgResourceIdentifier</span>(<span
style="color: rgb(163, 21, 21);">"Library://Samples/Sheboygan/Data/Parcels.FeatureSource"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgFeatureReader</span>
featureReader = featureService.SelectFeatures(parcelId, <span
style="color: rgb(163, 21, 21);">"Parcels"</span>, nameQuery);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; 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=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgSelection</span>
selection = <span style="color: blue;">new</span> <span
style="color: rgb(43, 145, 175);">MgSelection</span>(map);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">MgLayer</span> layer
= (<span style="color: rgb(43, 145, 175);">MgLayer</span>)map.GetLayers().GetItem(<span
style="color: rgb(163, 21, 21);">"Parcels"</span>);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> featureReader
=
featureService.SelectFeatures(parcelId, <span
style="color: rgb(163, 21, 21);">"Parcels"</span>,
nameQuery);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
selection.AddFeatures(layer, featureReader, 0);<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: rgb(43, 145, 175);">String</span>
selectionXML = selection.ToXml();<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">%><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="background: yellow none repeat scroll 0%; font-size: 10pt; font-family: "Courier New"; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><!</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">DOCTYPE</span><span
style="font-size: 10pt; 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;"><a class="moz-txt-link-rfc2396E" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</a>><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">html</span><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: red;">xmlns</span><span style="color: blue;">=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xhtml">"http://www.w3.org/1999/xhtml"</a></span>
<span style="color: blue;">><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">head</span><span
style="font-size: 10pt; 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=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;"><</span><span style="color: rgb(163, 21, 21);">title</span><span
style="color: blue;">></span>Untitled
Page<span style="color: blue;"></</span><span
style="color: rgb(163, 21, 21);">title</span><span style="color: blue;">><o:p></o:p></span></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">head</span><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"><</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">script</span><span
style="font-size: 10pt; 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=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;">function</span>
onPageLoad() {<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;">var</span>
selectionXML = <span style="color: rgb(163, 21, 21);">'<%=
selectionXML %>'</span>;<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";">
parent.SetSelectionXML(selectionXML); <o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> }<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
style="font-size: 10pt; font-family: "Courier New";"> <span
style="color: blue;"></</span><span style="color: rgb(163, 21, 21);">script</span><span
style="color: blue;">><o:p></o:p></span></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;"></</span><span
style="font-size: 10pt; font-family: "Courier New"; color: rgb(163, 21, 21);">html</span><span
style="font-size: 10pt; 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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
</body>
</html>