[mapguide-users] Parent groups missing from RuntimeMap
Hans Milling
hm at geograf.dk
Fri May 17 00:16:38 PDT 2013
Using MapGuide OS 2.2 and Maestro API 4.0.4, I have a problem when creating a
runtime map.
The map has a group childcare and a sub group schools with some layers
(public, private etc). When I use the CreateRuntimeMap all the groups are
created with no parent groups (the RuntimeMapLayer.Group is always an empty
string). When I look in the MapDefinition BaseMap the groups are there and
with their parent groups.
The source looks like this:
IServerConnection con =
ConnectionProviderRegistry.CreateConnection("Maestro.Http", ...);
IMapDefinition mdef =
(IMapDefinition)con.ResourceService.GetResource("library://maps/testmap.MapDefinition");
IMappingService mSvc =
(IMappingService)con.GetService((int)ServiceType.Mapping);
RuntimeMap rtm = mSvc.CreateMap(mdef);
The rtm.Groups only contains the groups that has layers and none of them has
any parent groups.
If I preview the map from Maestro the legend is correct with nested groups.
Is there another way to load the runtime map getting the correct group
structure?
I looked at the Maestro source and the RuntimeMapGroup.cs constructors do
not save the parent group from the IMapLayerGroup property into the new
RintimeMapGroup. Is there a reason for this? Also why does it work in
preview in Maestro, is there another way to load the runtime map where the
groups are correct?
Best regards
Hans Milling...
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Parent-groups-missing-from-RuntimeMap-tp5053876.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list