Opened 13 years ago

Closed 13 years ago

#1882 closed defect (fixed)

Improper runtime map state serialization for AIMS 2012

Reported by: jng Owned by: jng
Priority: medium Milestone: Maestro-4.0
Component: Maestro Version:
Severity: major Keywords:
Cc: hm External ID:

Description

Discussion snipped from mapguide-users:

Using Maestro API 4, when trying to use the IMappingService.OpenMap I get an Exception "On new versions, there should be no layer data in map". Am I not allowed to put any layers on a runtime map that I am going to use/open later, or what does this mean?

these are the steps that produces the error:

Uri host = new Uri("http://msvm/mapserver2012/mapagent/mapagent.fcgi");
IServerConnection conn = ConnectionProviderRegistry.CreateConnection("Maestro.Http", "Url", host.ToString(), "Username", "Administrator", "Password", "admin");
IMappingService mapSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
string mapdefinition = "Library://Byggesag/ByggesagKort.MapDefinition";
ResourceIdentifier rtmX = new ResourceIdentifier(mapdefinition);
string rtmDef = "Library://Runtime data cache/" + rtmX.Fullpath.Replace(":", "_").Replace("/", "_");
string mapName = rtmX.Name;
mapid = new ResourceIdentifier(mapName, ResourceTypes.RuntimeMap, con.SessionID);
IMapDefinition mdef = (IMapDefinition)con.ResourceService.GetResource(mapdefinition);
IMappingService mSvc = (IMappingService)con.GetService((int)ServiceType.Mapping);
RuntimeMap rtm = mSvc.CreateMap(mdef); // Create new runtime map
rtm.Save();
RuntimeMap tmprtm = mSvc.CreateMap(mapid, mdef); // Create new map in data cache
tmprtm.Save();

Later on I do this to retrieve the map and then it fails (the mapid has been stored in session variable or something)

RuntimeMap mymap = mapSvc.OpenMap(mapid); 

Change History (1)

comment:1 by jng, 13 years ago

Resolution: fixed
Status: newclosed

Fixed r6309

Note: See TracTickets for help on using tickets.