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:
- 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)
Change History (5)
by , 13 years ago
Attachment: | fix1964.diff added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Milestone: | → Maestro-4.0-maintenance |
---|
comment:3 by , 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 , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The attached diif file is for the 4.0 branch, not trunk. When fixed, please backport to 4.0 branch.