[mapguide-users] Saving map to session doesn't persist?

Chris Gountanis cgountanis at mpower-tech.com
Fri Nov 17 12:18:59 EST 2006


We have seen this on the Java side as well. As soon as you do a map.save the
session drops and errors out. Seems they do a empty selection as well before
the map save but no reasoning behind that as well. I don't see that logic in
your code. Wondering if that is even needed.


For example:
        MgMap map = new MgMap();
        MgResourceIdentifier resId = new
MgResourceIdentifier(mapDefinition);
        String mapName = resId.GetName();
        map.Create(resourceSrvc, resId, mapName);

        //create an empty selection object and store it in the session
repository
        MgSelection sel = new MgSelection(map);
        sel.Save(resourceSrvc, mapName);


--
Chris


-----Original Message-----
From: Jason Birch [mailto:Jason.Birch at nanaimo.ca] 
Sent: Friday, November 17, 2006 11:08 AM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] Saving map to session doesn't persist?

I've attached an example that I think should save a MapDefinition to the
session repository, but a call to MapAgent to render the map comes up with a
MgResourceNotFoundException (I think).
 
Is there something that says that MapDefinitions need to be modified to be
persisted?  Is there a typo in there somewhere?
 
Jason





More information about the Mapguide-users mailing list