<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD><TITLE>FW: Remove layers at runtime</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: StoneSans;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle19 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=120501723-12012007><FONT face=Arial 
color=#0000ff size=2>Hi Shane,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=120501723-12012007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=120501723-12012007><FONT face=Arial 
color=#0000ff size=2>Remove() should returns a boolean true or false.&nbsp; 
false indicates that the layer was not removed.&nbsp; Can you see if the remove 
was successful? (just trying to debug a bit)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=120501723-12012007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=120501723-12012007><FONT face=Arial 
color=#0000ff size=2>Thanks,<BR>Trevor</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Buscher, Shane 
[mailto:Shane.Buscher@nngco.com] <BR><B>Sent:</B> Friday, January 12, 2007 4:13 
PM<BR><B>To:</B> Trevor Wekel; Mapguide_users@lists.osgeo.org<BR><B>Subject:</B> 
RE: [Mapguide_users] FW: Remove layers at runtime<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Trevor,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks for the 
response.&nbsp; I think I&#8217;m doing everything you suggested correctly, but have 
provided the snippets below.&nbsp; When the page loads the ConnectToMapGuide() 
method gets called, which opens up the MgMap and sets it to a module level 
variable (map).&nbsp; Then, Button1 is clicked which successfully adds two 
layers to the map.&nbsp; When Button2 gets invoked, I try to remove the layers 
but the layers still persist in the map.&nbsp; <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I&#8217;m not sure where to 
go from here.&nbsp; Do you need to copy the layers in session, then add them 
from there in order to have the ability to remove them?&nbsp; Just 
reaching&#8230;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Regards,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Shane<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=green size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">&#8216;class 
vars<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Private</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> resourceService <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> 
MgResourceService<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Private</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> map <FONT color=blue><SPAN 
style="COLOR: blue">As</SPAN></FONT> MgMap<FONT color=green><SPAN 
style="COLOR: green"><o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Private</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub</SPAN></FONT> 
ConnectToMapGuide()<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=green><SPAN style="COLOR: green">'Connect to MapGuide 
site<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> userInfo <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">New</SPAN></FONT> MgUserInformation(Session.Item(<FONT 
color=maroon><SPAN 
style="COLOR: maroon">"mgSessionId"</SPAN></FONT>))<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> siteConn <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">New</SPAN></FONT> 
MgSiteConnection<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
siteConn.Open(userInfo)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=green><SPAN style="COLOR: green">'set resource 
service<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
resourceService = 
siteConn.CreateService(MgServiceType.ResourceService)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=green><SPAN style="COLOR: green">'Open 
map<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map = <FONT color=blue><SPAN style="COLOR: blue">New</SPAN></FONT> 
MgMap<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.Open(resourceService, Session.Item(<FONT color=maroon><SPAN 
style="COLOR: maroon">"mgMapName"</SPAN></FONT>))<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">End</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Protected</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub</SPAN></FONT> Button1_Click(<FONT color=blue><SPAN 
style="COLOR: blue">ByVal</SPAN></FONT> sender <FONT color=blue><SPAN 
style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">Object</SPAN></FONT>, <FONT color=blue><SPAN 
style="COLOR: blue">ByVal</SPAN></FONT> e <FONT color=blue><SPAN 
style="COLOR: blue">As</SPAN></FONT> System.EventArgs) <FONT color=blue><SPAN 
style="COLOR: blue">Handles</SPAN></FONT> 
Button1.Click<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp; <FONT color=green><SPAN style="COLOR: green">&#8216;add dwf 
layer</SPAN></FONT><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><FONT face="Courier New" 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp; 
Dim</SPAN></FONT><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> schematicId <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">New</SPAN></FONT>MgResourceIdentifier _ 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: 0.5in"><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<FONT color=maroon><SPAN 
style="COLOR: maroon">"Library://VST/Layers/SouthOmahaTeamSchematic.LayerDefinition"</SPAN></FONT>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> schematic <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> MgLayer = 
CreateLayer(schematicId, <FONT color=blue><SPAN 
style="COLOR: blue">False</SPAN></FONT>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp; map.GetLayers.Insert(index, schematic)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp; <FONT color=green><SPAN style="COLOR: green">&#8216;add sdf 
layer</SPAN></FONT><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Courier New" 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp; 
Dim</SPAN></FONT><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> valveId <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">New</SPAN></FONT> MgResourceIdentifier _ 
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: 0.5in"><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">(<FONT color=maroon><SPAN 
style="COLOR: maroon">"Library://VST/Layers/SouthOmahaValves.LayerDefinition"</SPAN></FONT>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> valves <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> MgLayer = 
CreateLayer(valveId, <FONT color=blue><SPAN 
style="COLOR: blue">True</SPAN></FONT>)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp; map.GetLayers.Insert(index, valves)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp; map.Save(resourceService)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=green><SPAN style="COLOR: green">'emit javascript to refresh 
map<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">End</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Protected</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub</SPAN></FONT> Button2_Click(<FONT color=blue><SPAN 
style="COLOR: blue">ByVal</SPAN></FONT> sender <FONT color=blue><SPAN 
style="COLOR: blue">As</SPAN></FONT> <FONT color=blue><SPAN 
style="COLOR: blue">Object</SPAN></FONT>, <FONT color=blue><SPAN 
style="COLOR: blue">ByVal</SPAN></FONT> e <FONT color=blue><SPAN 
style="COLOR: blue">As</SPAN></FONT> System.EventArgs) <FONT color=blue><SPAN 
style="COLOR: blue">Handles</SPAN></FONT> 
Button2.Click<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> lyr0 <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> MgLayer = 
map.GetLayers.GetItem(0)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=blue><SPAN style="COLOR: blue">Dim</SPAN></FONT> lyr1 <FONT 
color=blue><SPAN style="COLOR: blue">As</SPAN></FONT> MgLayer = 
map.GetLayers.GetItem(1)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.GetLayers.Remove(lyr0)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.GetLayers.Remove(lyr1)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.Save(resourceService)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=green><SPAN style="COLOR: green">'emit javascript to refresh 
map<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">End</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <FONT color=blue><SPAN 
style="COLOR: blue">Sub<o:p></o:p></SPAN></FONT></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><B><FONT face=Tahoma size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Trevor 
Wekel [mailto:trevor.wekel@autodesk.com] <BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, January 12, 2007 3:37 
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Buscher, Shane; 
Mapguide_users@lists.osgeo.org<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Mapguide_users] FW: Remove 
layers at runtime</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Hi 
Shane,</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">This 
should work.&nbsp; During your setup, are you calling MgMap.Open() or 
MgMap.Create()?&nbsp; The MgMap.Open() should set up the resource identifier 
correctly so that Save() will have the map to the correct session 
repository.</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Is the 
session id being propagated correctly?&nbsp; If you can do the following and the 
layer appears in the viewer then the session should be 
ok.</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.Open()</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.GetLayers().Insert(layer)</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.Save()</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">If the 
Insert() works and Remove() doesn't</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.Open()<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.GetLayers().Remove(layer)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">MgMap.Save()<o:p></o:p></SPAN></FONT></P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Then this 
is probably a bug.&nbsp; Also, does the behaviour depend on the number remaining 
layers?</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Thanks,</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=blue 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Trevor</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-ALIGN: center" 
align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal 
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 0in"><B><FONT 
face=Tahoma size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Buscher, 
Shane [mailto:Shane.Buscher@nngco.com] <BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, January 12, 2007 7:16 
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Buscher, Shane; 
Mapguide_users@lists.osgeo.org<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [Mapguide_users] FW: Remove 
layers at runtime</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I haven&#8217;t 
got any feedback yet, but I have been trying desperately to make this 
work.&nbsp; To recap, I&#8217;m finding that adding a layer to a map at runtime with 
MgLayerCollection.Add works fine.&nbsp; However, when I try to remove layer(s) 
with MgLayerCollection.Clear, MgLayerCollection.Remove, or 
MgLayerCollection.RemoveAt the layer(s) are indeed removed from the collection- 
but <I><SPAN style="FONT-STYLE: italic">not the map</SPAN></I>.&nbsp; I am 
saving the map and refreshing the map after removal.&nbsp; 
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">So why 
does inserting a layer into the MgMapCollection work, but removing not?&nbsp; 
Looking at the developers guide on page 56 there is a note for getting a layer 
collection from the map (MgMap.GetLayers): <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><I><FONT face=StoneSans 
size=1><SPAN 
style="FONT-SIZE: 9pt; FONT-STYLE: italic; FONT-FAMILY: StoneSans">In the 
MapGuide API, getting a collection returns a reference to the collection. So 
adding the layer to the layer collection immediately updates the 
map.<o:p></o:p></SPAN></FONT></I></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I am get 
the impression that adding a layer to the collection automatically updates the 
map, this doesn&#8217;t apply for removing a layer.&nbsp; I can&#8217;t figure out what I 
need to do to mimic what the api does for you when inserting a layer when trying 
to remove a layer.&nbsp; Or is this a bug?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks for 
any help in advance.&nbsp; <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Regards,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Shane<o:p></o:p></SPAN></FONT></P>
<DIV>
<DIV style="MARGIN-LEFT: 0.5in">
<DIV class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-ALIGN: center" 
align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><B><FONT face=Tahoma size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
mapguide_users-bounces@lists.osgeo.org 
[mailto:mapguide_users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Buscher, Shane<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, January 09, 2007 4:49 
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 
Mapguide_users@lists.osgeo.org<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Mapguide_users] FW: Remove layers 
at runtime</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I&#8217;ve run into issues with removing 
all layers from the map at runtime.&nbsp; See the code snippet below.&nbsp; All 
the layers get removed from the layerCollection, but the layers still 
display.&nbsp; I&#8217;ve successfully used the same code to insert layers, except I 
execute the</SPAN></FONT> <FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">layerCollection.Insert(index, 
layer) method.&nbsp; I don&#8217;t know why the same code wouldn&#8217;t work for clearing 
layers.&nbsp; </SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I have multiple layers 
stored in a library repository that users need to add and remove at 
runtime.&nbsp; Do I need to copy each layer in indvidual session repositories to 
add and reomove them?&nbsp; If I don&#8217;t, will one user adding/removing layers 
affect other user sessions?&nbsp; I know this is the case when you edit data, 
but these layers are view only.&nbsp;&nbsp;</SPAN></FONT> <o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&#8216;</SPAN></FONT><FONT 
face="Courier New" color=green size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">Connect to 
site server, set resource service, and open map</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">ConnectToMapGuide()&nbsp; 
</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=green size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">'Clear all 
layers in the map</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Dim</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> 
layerCollection</SPAN></FONT> <FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">As</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> MgLayerCollection = 
map.GetLayers()</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">If</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> layerCollection.GetCount 
&gt; 0</SPAN></FONT> <FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Then</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp; 
layerCollection.Clear()</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">End</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">If</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">map.Save(resourceService)</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=green size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'">'emit 
javascript to refresh map</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Dim</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> scriptKey</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">As</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">String</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> =</SPAN></FONT> <FONT 
face="Courier New" color=maroon size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">"ForceRefresh"</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">If</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Not</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> 
Page.ClientScript.IsStartupScriptRegistered(<FONT color=blue><SPAN 
style="COLOR: blue">Me</SPAN></FONT>.GetType, scriptKey)</SPAN></FONT> <FONT 
face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Then</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;</SPAN></FONT> <FONT 
face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">Dim</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> javaScript</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">As</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">String</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> =</SPAN></FONT> <FONT 
face="Courier New" color=maroon size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">"refreshMap("</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> &amp; MapAction.RefreshMap 
&amp;</SPAN></FONT> <FONT face="Courier New" color=maroon size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'">");"</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp; 
Page.ClientScript.RegisterStartupScript(<FONT color=blue><SPAN 
style="COLOR: blue">Me</SPAN></FONT>.GetType, scriptKey, 
javaScript,</SPAN></FONT> <FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">True</SPAN></FONT><FONT 
face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">)</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">End</SPAN></FONT> 
<FONT face="Courier New" color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">If</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><A name=""><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,</SPAN></FONT></A><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Shane</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial color=gray size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial">Operations 
IT</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial color=gray size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial">Northern Natural 
Gas</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><FONT face=Arial color=gray size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Arial">402.398.7841</SPAN></FONT><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><I><FONT face=Arial color=gray size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: gray; FONT-STYLE: italic; FONT-FAMILY: Arial">We 
think in generalities, but live in detail.&nbsp; 
</SPAN></FONT></I><o:p></o:p></P>
<P style="MARGIN-LEFT: 1in"><I><FONT face=Arial color=gray size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: gray; FONT-STYLE: italic; FONT-FAMILY: Arial">-Alred 
North Whitehead</SPAN></FONT></I><o:p></o:p></P></DIV></BODY></HTML>