[mapguide-commits] r4215 - trunk/MgDev/Common/Renderers

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Sep 10 14:55:23 EDT 2009


Author: waltweltonlair
Date: 2009-09-10 14:55:22 -0400 (Thu, 10 Sep 2009)
New Revision: 4215

Modified:
   trunk/MgDev/Common/Renderers/DWFRenderer.cpp
Log:
Fix #1088: Plot to DWF (eplot) - plot incomplete / features missing

The bug is in DWFRenderer.  It generates a W2D resource for each layer in the map.  There's some optimization code to only generate certain opcodes when style information changes from feature to feature.  This works fine if you just have one layer: the required opcodes are added as part of the first feature and are updated as necessary for the layer's remaining features.  But if you have more than one layer and those layers have the same style settings then you'll run into this defect.  When the second layer starts getting processed the optimization code still thinks that the style information is the same, and so it won't generate the opcodes.  But since this is a new layer with a new W2D it must have those opcodes  so that settings get initialized.  Without those opcodes the features in that layer will not display correctly.

The fix is to reset the cached style information (used by the optimization code) at the start of processing for each layer.  This ensures the initial opcodes are added to the W2D for each layer.


Modified: trunk/MgDev/Common/Renderers/DWFRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/DWFRenderer.cpp	2009-09-09 21:39:39 UTC (rev 4214)
+++ trunk/MgDev/Common/Renderers/DWFRenderer.cpp	2009-09-10 18:55:22 UTC (rev 4215)
@@ -382,7 +382,7 @@
 //
 // Indicates beginning of a map layer. This function creates a W2D for feature
 // data and a W2D for labeling. It also sets up selection support / object
-// deifnition. Labeling W2D is not opened -- it will only be opened if there
+// definition. Labeling W2D is not opened -- it will only be opened if there
 // are labels.
 //
 //-----------------------------------------------------------------------------
@@ -479,6 +479,11 @@
 
     // initialize the pattern tracking flag
     m_linePatternActive = true;
+
+    // we must reset the cached symbol information each time we begin
+    // a to ensure that the necessary initial opcodes are added to the
+    // W2D for the layer
+    m_lastSymbol = RS_MarkerDef();
 }
 
 



More information about the mapguide-commits mailing list