[mapguide-users] Modify dynamically a layer

Francis MILHAU fmilhau at ag-carto.fr
Tue Nov 18 10:04:02 EST 2008


Hi,
I have try the example to modify the filter of my layer before the map was
loaded : the sample run without error but the map is not refresh!
I do not if I have nice understand !
The method is to use Session repository to modify feature,layer,map and
layout and so the map is loaded with this parameters modify !
Can you confirm ?
Thanks

-----Message d'origine-----
De : mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org]De la part de James Card
Envoye : lundi 10 novembre 2008 17:34
A : MapGuide Users Mail List
Objet : Re: [mapguide-users] Modify dynamically a layer


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
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users




More information about the mapguide-users mailing list