<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-CA link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Good day All,</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>I have hit the 50 layer limitation in a MapServer
application I am currently working on. While I realize I can recompile MapServer
to increase this value, I’ve found that in approaching 50 layers I have
noticed a reduction in performance (not drastic, but enough) during loading and
re-drawing, etc., so I would prefer to split up the layers into separate maps
based on categories of data. Depending on what data the user wishes to review, the
appropriate map will be loaded up.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>I’ve created a widget that appears as a
drop-down SELECT and within the ParseURL am trying to change the application’s
map. I can do this by calling CWCInitialize on the current application:</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>$oApp = GetChameleonApplication();</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>$oApp->CWCInitialize($oApp->mszTemplate, $szFullPath2NewMapFile);</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Understandably, this does not reset things in all the
other Chameleon widgets. For example, I can easily get the current map’s
extents before initializing the new map and reset them on the new map
afterwards but, the KeyMap (and, I’m sure others as well) is trickier.
After I’ve initialized the new map, the KeyMap object is empty. I can’t
figure out where its values are supposed to be coming from, but when the KeyMap
constructor is run after I’ve initialized the new map, everything is
empty.</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>So, I’ve come to the conclusion that simply
calling CWCInitialize in the middle of a process is not a good idea. What is a
better approach for a person to go about changing the map within the running of
an application?</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>Cheers,</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'>jtm</span></font></p>
</div>
</body>
</html>