[mapguide-trac] #1882: Improper runtime map state serialization for
AIMS 2012
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Dec 8 02:08:56 EST 2011
#1882: Improper runtime map state serialization for AIMS 2012
-----------------------+----------------------------------------------------
Reporter: jng | Owner: jng
Type: defect | Status: new
Priority: medium | Milestone: Maestro-4.0
Component: Maestro | Version:
Severity: major | Keywords:
External_id: |
-----------------------+----------------------------------------------------
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);
}}}
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1882>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list