[mapguide-commits] r6623 - in
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI: . Mapping
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue May 8 08:34:17 EDT 2012
Author: jng
Date: 2012-05-08 05:34:17 -0700 (Tue, 08 May 2012)
New Revision: 6623
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
Log:
#1976: RuntimeMapLayer fixes. Patch by Hans Milling.
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs 2012-05-08 12:16:22 UTC (rev 6622)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs 2012-05-08 12:34:17 UTC (rev 6623)
@@ -290,6 +290,7 @@
foreach (var layer in group.BaseMapLayer)
{
var rtl = _mapSvc.CreateMapLayer(this, layer);
+ rtl.Type = RuntimeMapLayer.kDynamic; //HACK: Setting Visible = true not allowed for kBaseMap
rtl.Visible = true;
rtl.Type = RuntimeMapLayer.kBaseMap;
rtl.Group = group.Name;
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs 2012-05-08 12:16:22 UTC (rev 6622)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs 2012-05-08 12:34:17 UTC (rev 6623)
@@ -1895,6 +1895,8 @@
rtLayer.Name = source.Name;
rtLayer.Selectable = source.Selectable;
rtLayer.ShowInLegend = source.ShowInLegend;
+ rtLayer.Visible = true;
+ rtLayer.Type = RuntimeMapLayer.kBaseMap;
return rtLayer;
}
@@ -1907,9 +1909,15 @@
/// <returns></returns>
public RuntimeMapLayer CreateMapLayer(RuntimeMap parent, IMapLayer source)
{
- var rtLayer = CreateMapLayer(parent, (IBaseMapLayer)source);
+ ILayerDefinition layerDef = (ILayerDefinition)GetResource(source.ResourceId);
+ var rtLayer = CreateMapLayer(parent, layerDef);
//These may not match, so set them here
+ rtLayer.ExpandInLegend = source.ExpandInLegend;
+ rtLayer.LegendLabel = source.LegendLabel;
+ rtLayer.Name = source.Name;
+ rtLayer.Selectable = source.Selectable;
+ rtLayer.ShowInLegend = source.ShowInLegend;
rtLayer.Group = source.Group;
rtLayer.Visible = source.Visible;
More information about the mapguide-commits
mailing list