Runtime Maps
Overview The T:OSGeo.MapGuide.MaestroAPI.Mapping.RuntimeMap represents the state of the map that a user is currently looking at in the viewer. It contains all the relevant information about the current map: The current view center and scale The list of T:OSGeo.MapGuide.MaestroAPI.Mapping.RuntimeMapLayer instances that belong to this map The list of T:OSGeo.MapGuide.MaestroAPI.Mapping.RuntimeMapGroup instances that belong to this map The current extents of the map The display width/height/dpi of the map To obtain a reference to a runtime map, you will have to create one (via M:OSGeo.MapGuide.MaestroAPI.Services.IMappingService.CreateMap(System.String,OSGeo.MapGuide.ObjectModels.MapDefinition.IMapDefinition)) or open an existing one (via M:OSGeo.MapGuide.MaestroAPI.Services.IMappingService.OpenMap(System.String)). Note that when opening an existing runtime map, you need to supply the resource id of the runtime map state If given a map name and session id, the runtime map state resource id is usually of the form: Session:session-id//mapName.Map Most of this runtime map state can be manipulated through the APIs provided by the Maestro API. When manipulating the state of the runtime map (which also includes modifications to layers and groups that belong to it), you must remember to call M:OSGeo.MapGuide.MaestroAPI.Mapping.RuntimeMap.Save on the map to persist your modifications.
Compatibility The T:OSGeo.MapGuide.MaestroAPI.Mapping.RuntimeMap operates on a binary blob on the MapGuide Server that represents the internal state of the runtime map. New versions of MapGuide may introduce new states that may break compatibility with the RuntimeMap class. As such, usage of the RuntimeMap in the Maestro API is restricted to the following versions of MapGuide (includes point releases and service packs): MapGuide Open Source 1.2 MapGuide Open Source 2.0 MapGuide Open Source 2.1 MapGuide Open Source 2.2 Autodesk MapGuide Enterprise 2008 Autodesk MapGuide Enterprise 2009 Autodesk MapGuide Enterprise 2010 Autodesk MapGuide Enterprise 2011 Autodesk Infrastructure Map Server 2012 If you are not using a version of MapGuide that is on this list, there is no guarantee the RuntimeMap will work as expected.