[mapguide-users] Modify dynamically a layer

James Card James.Card at calcad.com
Mon Nov 10 11:33:48 EST 2008


On Mon, 10 Nov 2008 05:05:40 -0800, Francis MILHAU <fmilhau at ag-carto.fr>  
wrote:

> We want modify dynamically a layer; for exemple, modify the filter of a
> layer  when the map is loaded;

I've previously posted sample PHP code that demonstrates this; it should  
be in the list archives. (When I have an hour or two free I'll clean up  
that code and add it to the PHP samples in the Wiki.)

The basic process is to load the XML layer definition, modify it, and then  
save the modified version to the session repository. Then you'll have to  
follow a similar process to modify your map definition to point to the  
modified layer definition (that is now in the Session repository rather  
than in the Library repository), and then modify your layout definition to  
point to the new map definition.

-- 
James Card
California CAD Solutions, Inc.
209-578-5580 - Voice
209-521-6493 - FAX


More information about the mapguide-users mailing list