Opened 13 years ago

Closed 13 years ago

#1964 closed defect (fixed)

Group property empty on RuntimeMap layers from basemap group/layer

Reported by: hm Owned by: jng
Priority: medium Milestone: Maestro-4.0-maintenance
Component: Maestro Version:
Severity: minor Keywords: MaestroAPI, base layer group
Cc: External ID:

Description

Steps to reproduce:

  1. Create a map with a group and a layer. Convert the group to a base layer group.

When you create a runtimemap using IMappingService.CreateMap() and run the following code, the Group property string of the layer is empty:

foreach (RuntimeMapLayer l in map.Layers) {

Console.Writeline(l.Group);

}

Fix: in the MaestroAPI. RuntimeMap.cs constructor:

internal RuntimeMap(IMapDefinition mdf, double metersPerUnit)

: this(mdf.CurrentConnection)

update the code inside:

if(mdf.BaseMap != null)

{ . . .

foreach (var layer in group.BaseMapLayer) {

var rtl = _mapSvc.CreateMapLayer(this, layer); rtl.Visible = true; rtl.Type = RuntimeMapLayer.kBaseMap;

NEW LINE --> rtl.Group = group.Name;

this.Layers.Add(rtl);

}

. . . }

Best regards

Hans Milling...

Attachments (1)

fix1964.diff (64 bytes ) - added by hm 13 years ago.

Download all attachments as: .zip

Change History (5)

by hm, 13 years ago

Attachment: fix1964.diff added

comment:1 by hm, 13 years ago

The attached diif file is for the 4.0 branch, not trunk. When fixed, please backport to 4.0 branch.

comment:2 by jng, 13 years ago

Milestone: Maestro-4.0-maintenance

comment:3 by jng, 13 years ago

Mental note: needs to be fixed in both 4.0.x branch and trunk (damn trac 1-milestone ticket limitation!)

comment:4 by jng, 13 years ago

Resolution: fixed
Status: newclosed

Fixed r6621 (4.0.x) r6622 (trunk)

Note: See TracTickets for help on using tickets.