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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Mar 9 20:25:46 EST 2007


Author: waltweltonlair
Date: 2007-03-09 20:25:46 -0500 (Fri, 09 Mar 2007)
New Revision: 1195

Modified:
   trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.cpp
   trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.h
   trunk/MgDev/Server/src/Services/Rendering/OpQueryFeatures.cpp
Log:
Add QueryFeatures support to the new stylization.  This includes handling
of tooltips and urls.  Now when you hover over the geometry of one of the
new symbols QueryFeatures will return that feature and its tooltip / url.

Fixed some other problems while working on this:
- SE_String was not always storing copies of passed in strings
- some members in StylizationEngine were not getting initialized
- the StylizationEngine::Stylize method was checking the wrong data
  at the beginning of the method (member variables instead of passed
  in arguments)
- removed some unnecessary member variables from StylizationEngine
- SE_StyleVisitor now allows the symbol manager to be NULL


Modified: trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.cpp	2007-03-10 01:21:45 UTC (rev 1194)
+++ trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.cpp	2007-03-10 01:25:46 UTC (rev 1195)
@@ -55,7 +55,7 @@
 void FeatureInfoRenderer::StartFeature (RS_FeatureReader* feature, 
                             const RS_String* tooltip, 
                             const RS_String* url, 
-                            const RS_String* theme,
+                            const RS_String* /*theme*/,
                             double /*zOffset*/,
                             double /*zExtrusion*/,
                             RS_ElevationType /*zOffsetType*/)

Modified: trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.h
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.h	2007-03-10 01:21:45 UTC (rev 1194)
+++ trunk/MgDev/Server/src/Services/Rendering/FeatureInfoRenderer.h	2007-03-10 01:25:46 UTC (rev 1195)
@@ -19,6 +19,7 @@
 #define FeatureInfoRenderer_H
 
 #include "Renderer.h"
+#include "SE_Renderer.h"
 
 class MgFeatureReader;
 class MgPropertyCollection;
@@ -29,8 +30,8 @@
 //A simple Renderer implementation for use by the QueryFeatures
 //RenderingService API. Accumulates feature IDs and also attributes
 //for one feature (case where a tooltip or attribute info needs to
-//bedisplayed in the html viewer)
-class MG_SERVER_RENDERING_API FeatureInfoRenderer : public Renderer
+//be displayed in the AJAX viewer)
+class MG_SERVER_RENDERING_API FeatureInfoRenderer : public Renderer, public SE_Renderer
 {
 public:
     FeatureInfoRenderer(MgSelection* selection,
@@ -149,6 +150,69 @@
         return false;
     }
 
+    ///////////////////////////////////
+    // SE_Renderer implementation
+
+    virtual void ProcessPoint(LineBuffer* geometry, SE_RenderPointStyle* style)
+    {}
+
+    virtual void ProcessLine(LineBuffer* geometry, SE_RenderLineStyle* style)
+    {}
+
+    virtual void ProcessArea(LineBuffer* geometry, SE_RenderAreaStyle* style)
+    {}
+
+    virtual void DrawSymbol(SE_RenderSymbol& symbol, const SE_Matrix& xform, double anglerad)
+    {}
+
+    virtual void DrawScreenPolyline(LineBuffer* polyline, unsigned int color, double weight)
+    {}
+
+    virtual void DrawScreenPolygon(LineBuffer* polygon, unsigned int fill)
+    {}
+
+    virtual void DrawScreenRaster(unsigned char* data, int length, RS_ImageFormat format, int native_width, int native_height,
+        double x, double y, double w, double h, double angledeg)
+    {}
+
+    virtual void DrawScreenText(const RS_String& txt, RS_TextDef& tdef, double insx, double insy, double* path, int npts, double param_position)
+    {}
+
+    virtual void GetWorldToScreenTransform(SE_Matrix& xform)
+    {}
+
+    virtual void WorldToScreenPoint(double& inx, double& iny, double& ox, double& oy)
+    {}
+
+    virtual void ScreenToWorldPoint(double& inx, double& iny, double& ox, double& oy)
+    {}
+
+    virtual double GetPixelsPerMillimeterScreen()
+    {
+        return 0.0;
+    }
+
+    virtual double GetPixelsPerMillimeterWorld()
+    {
+        return 0.0;
+    }
+
+    virtual RS_FontEngine* GetFontEngine()
+    {
+        return NULL;
+    }
+
+    virtual void ProcessLabelGroup(SE_LabelInfo*    labels,
+                                   int              nlabels,
+                                   RS_OverpostType  type,
+                                   bool             exclude,
+                                   LineBuffer*     path = NULL)
+    {}
+
+    virtual void AddExclusionRegion(RS_F_Point* fpts, int npts)
+    {}
+
+
     ///////////////////////////////////////////////////////////////////////
     // FeatureInfoRenderer functions
 

Modified: trunk/MgDev/Server/src/Services/Rendering/OpQueryFeatures.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/OpQueryFeatures.cpp	2007-03-10 01:21:45 UTC (rev 1194)
+++ trunk/MgDev/Server/src/Services/Rendering/OpQueryFeatures.cpp	2007-03-10 01:25:46 UTC (rev 1195)
@@ -97,7 +97,7 @@
     // Successful operation
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
-    MG_CATCH(L"MgOpGeneratePlot.Execute")
+    MG_CATCH(L"MgOpQueryFeatures.Execute")
 
     if (mgException != NULL)
     {



More information about the mapguide-commits mailing list