I could propose a patch to fix that problem The idea would be to verify if the Session://...MapDefinition exist If it already exist, do not overwrite
Something like this bool mapStateIdExist = true; MgResourceIdentifier mapStateId = new MgResourceIdentifier("Session:" + sessionId + "//" + mapName + "." + MgResourceType.Map); try { MgByteReader tmpReader = resourceSrvc.GetResourceContent(mapStateId); } catch(MgException mge) { mapStateIdExist = false; } Then use the mapStateIdExist flag //if MapStateId exist, we should not erase the selection if(!mapStateIdExist) { //create an empty selection object and store it in the session repository MgSelection sel = new MgSelection(map); sel.Save(resourceSrvc, mapName); } and //if MapStateId exist, we should not overwrite it if(!mapStateIdExist) { map.Save(resourceSrvc, mapStateId); } -- View this message in context: http://www.nabble.com/Problem-opening-a-webLayout-with-predefined-selection-tp21035935p21049538.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users