[Chameleon] Contexts

Julien-Samuel Lacroix jlacroix at dmsolutions.ca
Tue Sep 28 10:23:19 EDT 2004



Paul Spencer wrote:
>>
>> 2) Is it feasible to combine a context with your current map? Right now
>> if you upload a context it replaces the map you have with the new one.
>> Is it feasible that you could add the layers in a context to your
>> existing map so that you would get a combination of the two in your map
>> window instead of just the newly loaded context?
> 
> 
> yes it is feasible.  The low level functionality is there.  MapScript 
> loads a context by replacing all the layers, but it is possible to load 
> a context into a new mapobj and then copy all the layers across.  Note 
> that while this is possible, it may not provide the best results because 
> of layer ordering (polygons on top of points for instance).  When 
> dealing with WMS, it is not normally possible to discover the feature 
> type of the layer, which is a disappointing limitation for client apps 
> that want to be somewhat intelligent about this sort of thing.

Note that the mapscript loadMapContext function load all the layers in 
the context file on the top of the layers already there. It does not 
remove the layers already in the map object so you don't have to readd 
them after loading your context.

Thanks
Julien

-- 
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------


More information about the Chameleon mailing list