[mapguide-commits] r5819 - in trunk/Tools/Maestro: Maestro.Base/Editor OSGeo.MapGuide.MaestroAPI/ObjectModels

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 18 12:54:07 EDT 2011


Author: jng
Date: 2011-05-18 09:54:07 -0700 (Wed, 18 May 2011)
New Revision: 5819

Modified:
   trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs
Log:
#1693: Setup the backbone APIs for KML extrusion support. IVectorScaleRange2 (the current interface that support composite styles) has been changed to IVectorScaleRange3 (which extends IVectorScaleRange2). The new IVectorScaleRange2 exposes the ElevationSettings property and a method to create this instance.


Modified: trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2011-05-18 16:05:53 UTC (rev 5818)
+++ trunk/Tools/Maestro/Maestro.Base/Editor/LayerDefinitionEditor.cs	2011-05-18 16:54:07 UTC (rev 5819)
@@ -105,8 +105,8 @@
         {
             foreach (var vsr in vl.VectorScaleRange)
             {
-                var vsr2 = vsr as IVectorScaleRange2;
-                if (vsr2 != null && vsr2.CompositeStyle != null)
+                var vsr3 = vsr as IVectorScaleRange3;
+                if (vsr3 != null && vsr3.CompositeStyle != null)
                     return true;
             }
             return false;

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-05-18 16:05:53 UTC (rev 5818)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaces.cs	2011-05-18 16:54:07 UTC (rev 5819)
@@ -580,11 +580,38 @@
     }
 
     /// <summary>
-    /// The stylization to be applied to the vector features for a given scale range. Supports composite styles
+    /// The stylization to be applied to the vector features for a given scale range. Supports elevation
+    /// and extrusion settings.
+    /// 
+    /// Supported by Layer Definition 1.1.0 and higher
     /// </summary>
     public interface IVectorScaleRange2 : IVectorScaleRange
     {
         /// <summary>
+        /// Creates a new instance of <see cref="IElevationSettings"/>. This instance is detached
+        /// and needs to be assigned to the <see cref="ElevationSettings"/> property to take effect.
+        /// </summary>
+        /// <param name="zOffset"></param>
+        /// <param name="zExtrusion"></param>
+        /// <param name="zOffsetType"></param>
+        /// <param name="unit"></param>
+        /// <returns></returns>
+        IElevationSettings Create(string zOffset, string zExtrusion, ElevationTypeType zOffsetType, LengthUnitType unit);
+
+        /// <summary>
+        /// Gets or sets the elevation settings
+        /// </summary>
+        IElevationSettings ElevationSettings { get; set; }
+    }
+
+    /// <summary>
+    /// The stylization to be applied to the vector features for a given scale range. Supports composite styles.
+    /// 
+    /// Supported by Layer Definition 1.2.0 and higher
+    /// </summary>
+    public interface IVectorScaleRange3 : IVectorScaleRange2
+    {
+        /// <summary>
         /// Gets or sets the composite style for this scale range
         /// </summary>
         ICompositeTypeStyle CompositeStyle { get; set; }

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-05-18 16:05:53 UTC (rev 5818)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/VectorLayerDefinitionImpl.cs	2011-05-18 16:54:07 UTC (rev 5819)
@@ -80,9 +80,12 @@
     }
 
     partial class VectorScaleRangeType : IVectorScaleRange
-#if LDF_120 || LDF_130
+#if LDF_110
         , IVectorScaleRange2
 #endif
+#if LDF_120 || LDF_130
+        , IVectorScaleRange3
+#endif
     {
         #region Missing generated stuff
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -308,9 +311,34 @@
             }
         }
 #endif
+
+#if LDF_100
+#else
+        IElevationSettings IVectorScaleRange2.ElevationSettings
+        {
+            get { return this.ElevationSettings; }
+            set { this.ElevationSettings = (ElevationSettingsType)value; }
+        }
+
+        IElevationSettings IVectorScaleRange2.Create(string zOffset, string zExtrusion, ElevationTypeType zOffsetType, LengthUnitType unit)
+        {
+            return new ElevationSettingsType()
+            {
+                ZOffset = zOffset,
+                ZOffsetType = zOffsetType,
+                ZExtrusion = zExtrusion,
+                Unit = unit
+            };
+        }
+#endif
     }
 
 #if LDF_100
+#else
+    partial class ElevationSettingsType : IElevationSettings { }
+#endif
+
+#if LDF_100
     partial class StrokeType : IStroke
 #else
     partial class StrokeType : IStroke, IStroke2



More information about the mapguide-commits mailing list