[mapguide-commits] r7841 - trunk/MgDev/Server/src/Services/Rendering

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Sep 6 01:13:34 PDT 2013


Author: hubu
Date: 2013-09-06 01:13:34 -0700 (Fri, 06 Sep 2013)
New Revision: 7841

Modified:
   trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.cpp
   trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.h
Log:
Submit on behalf of Andy Zhang.
Fix ticket#2356 http://trac.osgeo.org/mapguide/ticket/2356 Zoom Selection doesn't work in flexible web layout




 

Modified: trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.cpp	2013-09-05 09:59:09 UTC (rev 7840)
+++ trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.cpp	2013-09-06 08:13:34 UTC (rev 7841)
@@ -20,6 +20,7 @@
 #include "MapGuideCommon.h"
 #include "FeaturePropRenderer.h"
 #include "RS_FeatureReader.h"
+#include "SE_SymbolDefProxies.h"
 
 #define SPECIAL_PROP_LAYER_NAME     L"_MgLayerName"
 #define SPECIAL_PROP_BOUNDING_BOX   L"_MgFeatureBoundingBox"
@@ -200,4 +201,80 @@
     val += L" ";
     val += buf;
     bbox->SetValue(val);
-}
\ No newline at end of file
+}
+
+void FeaturePropRenderer::ProcessPoint(SE_ApplyContext* ctx,
+                                       SE_RenderPointStyle* style,
+                                       RS_Bounds* bounds)
+{
+    if (!m_bIncludeFeatureBBOX)
+        return;
+
+    //Should we inflate this a bit to represent an actual box?
+    const RS_Bounds& featBounds = ctx->geometry->bounds();
+    Ptr<MgStringProperty> bbox = dynamic_cast<MgStringProperty*>(m_currentFeature->GetItem(SPECIAL_PROP_BOUNDING_BOX));
+    STRING val;
+    STRING buf;
+    MgUtil::DoubleToString(featBounds.minx, buf);
+    val += buf;
+    MgUtil::DoubleToString(featBounds.miny, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxx, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxy, buf);
+    val += L" ";
+    val += buf;
+    bbox->SetValue(val);
+}
+
+void FeaturePropRenderer::ProcessLine(SE_ApplyContext* ctx,
+                                      SE_RenderLineStyle* style)
+{
+    if (!m_bIncludeFeatureBBOX)
+        return;
+
+    //Should we inflate this a bit to represent an actual box?
+    const RS_Bounds& featBounds = ctx->geometry->bounds();
+    Ptr<MgStringProperty> bbox = dynamic_cast<MgStringProperty*>(m_currentFeature->GetItem(SPECIAL_PROP_BOUNDING_BOX));
+    STRING val;
+    STRING buf;
+    MgUtil::DoubleToString(featBounds.minx, buf);
+    val += buf;
+    MgUtil::DoubleToString(featBounds.miny, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxx, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxy, buf);
+    val += L" ";
+    val += buf;
+    bbox->SetValue(val);
+}
+
+void FeaturePropRenderer::ProcessArea(SE_ApplyContext* ctx,
+                                      SE_RenderAreaStyle* style)
+{
+    if (!m_bIncludeFeatureBBOX)
+        return;
+
+    //Should we inflate this a bit to represent an actual box?
+    const RS_Bounds& featBounds = ctx->geometry->bounds();
+    Ptr<MgStringProperty> bbox = dynamic_cast<MgStringProperty*>(m_currentFeature->GetItem(SPECIAL_PROP_BOUNDING_BOX));
+    STRING val;
+    STRING buf;
+    MgUtil::DoubleToString(featBounds.minx, buf);
+    val += buf;
+    MgUtil::DoubleToString(featBounds.miny, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxx, buf);
+    val += L" ";
+    val += buf;
+    MgUtil::DoubleToString(featBounds.maxy, buf);
+    val += L" ";
+    val += buf;
+    bbox->SetValue(val);
+}

Modified: trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.h
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.h	2013-09-05 09:59:09 UTC (rev 7840)
+++ trunk/MgDev/Server/src/Services/Rendering/FeaturePropRenderer.h	2013-09-06 08:13:34 UTC (rev 7841)
@@ -61,6 +61,16 @@
                                bool          allowOverpost,
                                RS_Bounds*    bounds = NULL);
 
+    virtual void ProcessPoint(SE_ApplyContext* ctx,
+                              SE_RenderPointStyle* style,
+                              RS_Bounds* bounds = NULL);
+
+    virtual void ProcessLine(SE_ApplyContext* ctx,
+                             SE_RenderLineStyle* style);
+
+    virtual void ProcessArea(SE_ApplyContext* ctx,
+                             SE_RenderAreaStyle* style);
+
     MgBatchPropertyCollection* GetProperties()
     {
         return SAFE_ADDREF(m_featprops);



More information about the mapguide-commits mailing list