[Chameleon] switching mapfiles at runtime

McGraw, Joanne mcgrawj at AGR.GC.CA
Fri Jun 10 11:13:06 EDT 2005

Good day All,


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.


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:


$oApp = GetChameleonApplication();

$oApp->CWCInitialize($oApp->mszTemplate, $szFullPath2NewMapFile);


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


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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050610/a1af36e8/attachment.html

More information about the Chameleon mailing list