[mapguide-commits] r5761 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun May 8 13:22:43 EDT 2011


Author: jng
Date: 2011-05-08 10:22:43 -0700 (Sun, 08 May 2011)
New Revision: 5761

Modified:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
Log:
#1681: Expose a setter for the DisplayOrder property. 

Also fix some missing properties that were not being set.

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs	2011-05-05 13:23:06 UTC (rev 5760)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs	2011-05-08 17:22:43 UTC (rev 5761)
@@ -84,6 +84,21 @@
             Check.NotNull(ldf, "ldf");
 
             this.LayerDefinitionID = ldf.ResourceID;
+            if (ldf.SubLayer.LayerType == LayerType.Vector)
+            {
+                var vl = ((IVectorLayerDefinition)ldf.SubLayer);
+                this.QualifiedClassName = vl.FeatureName;
+                this.GeometryPropertyName = vl.Geometry;
+                this.FeatureSourceID = vl.ResourceId;
+            }
+            else if (ldf.SubLayer.LayerType == LayerType.Raster)
+            {
+                var rl = ((IRasterLayerDefinition)ldf.SubLayer);
+                this.QualifiedClassName = rl.FeatureName;
+                this.GeometryPropertyName = rl.Geometry;
+                this.FeatureSourceID = rl.ResourceId;
+            }
+
             this.ExpandInLegend = false;
             this.Name = ResourceIdentifier.GetName(ldf.ResourceID);
             this.Selectable = true;
@@ -215,6 +230,15 @@
         }
 
         /// <summary>
+        /// Sets the display order of this layer
+        /// </summary>
+        /// <param name="priority"></param>
+        public void SetDrawOrder(double priority)
+        {
+            this.DisplayOrder = priority;
+        }
+
+        /// <summary>
         /// Gets the layer definition ID.
         /// </summary>
         /// <value>The layer definition ID.</value>



More information about the mapguide-commits mailing list