[mapguide-commits] r7438 - in branches/2.5/MgDev/Desktop: MapViewer MgAppLayout

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Apr 2 05:07:54 PDT 2013


Author: jng
Date: 2013-04-02 05:07:54 -0700 (Tue, 02 Apr 2013)
New Revision: 7438

Modified:
   branches/2.5/MgDev/Desktop/MapViewer/IMapViewer.cs
   branches/2.5/MgDev/Desktop/MapViewer/MgMapViewer.cs
   branches/2.5/MgDev/Desktop/MgAppLayout/SheboyganTiled.AppLayout
Log:
mg-desktop viewer update. Use the new RenderBaseLayers flag for RenderDynamicOverlay calls. This eliminates the need to use the ConvertTiledGroupsToNonTiled and UseRenderMapIfTiledLayersExist workaround properties for rendering tiled layers. Such properties have been documented about their newfound irrelevance to the problem at hand. These properties will be retained for compatibility purposes.

Modified: branches/2.5/MgDev/Desktop/MapViewer/IMapViewer.cs
===================================================================
--- branches/2.5/MgDev/Desktop/MapViewer/IMapViewer.cs	2013-04-01 10:51:54 UTC (rev 7437)
+++ branches/2.5/MgDev/Desktop/MapViewer/IMapViewer.cs	2013-04-02 12:07:54 UTC (rev 7438)
@@ -392,6 +392,10 @@
         /// If <see cref="P:OSGeo.MapGuide.Viewer.IMapViewer.UseRenderMapIfTiledLayersExist"/> is set
         /// to true, this property has no effect.
         /// </summary>
+        /// <remarks>
+        /// As of 2.5, images from RenderDynamicOverlay will include any base layers by default. Using this property
+        /// as a workaround is no longer required. This property remains for compatibility purposes.
+        /// </remarks>
         bool ConvertTiledGroupsToNonTiled { get; set; }
 
         /// <summary>
@@ -400,6 +404,11 @@
         /// of any tile caching mechanisms. Setting this property to true nullifies any effect of the 
         /// <see cref="P:OSGeo.MapGuide.Viewer.IMapViewer.ConvertTiledGroupsToNonTiled"/> property
         /// </summary>
+        /// <remarks>
+        /// As of 2.5, images from RenderDynamicOverlay will include any base layers by default. Setting this property to true is no longer required
+        /// unless you still require map images to be rendered with a pre-filled background (which RenderMap() does). This property remains
+        /// for compatibility purposes.
+        /// </remarks>
         bool UseRenderMapIfTiledLayersExist { get; set; }
 
         /// <summary>

Modified: branches/2.5/MgDev/Desktop/MapViewer/MgMapViewer.cs
===================================================================
--- branches/2.5/MgDev/Desktop/MapViewer/MgMapViewer.cs	2013-04-01 10:51:54 UTC (rev 7437)
+++ branches/2.5/MgDev/Desktop/MapViewer/MgMapViewer.cs	2013-04-02 12:07:54 UTC (rev 7438)
@@ -1163,14 +1163,31 @@
 
         #endregion
 
+        /// <summary>
+        /// Renders the selected feature(s)
+        /// </summary>
+        const int BEHAVIOR_RENDER_SELECTION = 1;
+        /// <summary>
+        /// Renders the dynamic layers on the map
+        /// </summary>
+        const int BEHAVIOR_RENDER_LAYERS = 2;
+        /// <summary>
+        /// Renders the selected feature(s) even if they are outside the current scale
+        /// </summary>
+        const int BEHAVIOR_KEEP_SELECTION = 4;
+        /// <summary>
+        /// Renders the base layers on the map
+        /// </summary>
+        const int BEHAVIOR_RENDER_BASE_LAYERS = 8; //New in 2.5
+
         static MgViewerRenderingOptions CreateMapRenderingOptions(short red, short green, short blue)
         {
-            return new MgViewerRenderingOptions("PNG", 2, new MgColor(red, green, blue)); //NOXLATE
+            return new MgViewerRenderingOptions("PNG", BEHAVIOR_RENDER_LAYERS | BEHAVIOR_RENDER_BASE_LAYERS, new MgColor(red, green, blue)); //NOXLATE
         }
 
         static MgViewerRenderingOptions CreateSelectionRenderingOptions(short red, short green, short blue)
         {
-            return new MgViewerRenderingOptions("PNG", (1 | 4), new MgColor(red, green, blue)); //NOXLATE
+            return new MgViewerRenderingOptions("PNG", (BEHAVIOR_RENDER_SELECTION | BEHAVIOR_KEEP_SELECTION), new MgColor(red, green, blue)); //NOXLATE
         }
 
         public void LoadMap(MgMapBase map)

Modified: branches/2.5/MgDev/Desktop/MgAppLayout/SheboyganTiled.AppLayout
===================================================================
--- branches/2.5/MgDev/Desktop/MgAppLayout/SheboyganTiled.AppLayout	2013-04-01 10:51:54 UTC (rev 7437)
+++ branches/2.5/MgDev/Desktop/MgAppLayout/SheboyganTiled.AppLayout	2013-04-02 12:07:54 UTC (rev 7438)
@@ -13,7 +13,7 @@
     </NameValue>
     <NameValue>
       <Name>UseRenderMapIfTiledLayersExist</Name>
-      <Value>true</Value>
+      <Value>false</Value>
     </NameValue>
     <NameValue>
       <Name>RespectFiniteDisplayScales</Name>



More information about the mapguide-commits mailing list