[mapguide-users] Save a Web Layout to Session

Scott McFarlane scott at geotropix.com
Wed Mar 21 15:42:18 EDT 2007

To save any resource to the session repository, you simply use SetResource
using the following ResourceID syntax:

"Session:" + <current session ID> + "//" + <resource name>

For example, a web layout stored in the session repository might have the
following ResourceID:


Hope this helps!


-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jim O'Leary
Sent: Wednesday, March 21, 2007 11:10 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Save a Web Layout to Session

I would like to associate a map with a web layout at runtime. I can do that
by extracting the XML of the web layout using GetResourceContent(),
replacing the 
content with the path to the map, and then saving the web layout to the
repository using SetResource. However, I would like to save the new web
layout to the Session, and this doesn't work for SetResource.

The Dev Guide indicates that you save a map to Session by

$map->Save($resourceService, $mapId);

However, there appears to be no MGWebLayout class to do the same for a web
layout. Is there a way to save a web layout to session?
View this message in context:
Sent from the MapGuide Users mailing list archive at Nabble.com.

mapguide-users mailing list
mapguide-users at lists.osgeo.org

More information about the mapguide-users mailing list