[mapguide-commits] r4348 - trunk/MgDev/Common/PlatformBase/MapLayer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Nov 17 01:20:33 EST 2009


Author: christinebao
Date: 2009-11-17 01:20:32 -0500 (Tue, 17 Nov 2009)
New Revision: 4348

Modified:
   trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h
Log:
Fix ticket https://trac.osgeo.org/mapguide/ticket/1154.
MgLayerBase should be able to get the filter of layer definition

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp	2009-11-16 17:28:25 UTC (rev 4347)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp	2009-11-17 06:20:32 UTC (rev 4348)
@@ -422,7 +422,15 @@
     return m_featureName;
 }
 
+//////////////////////////////////////////////////////////////
+// Gets the filter associated with this layer
+//
+STRING MgLayerBase::GetFilter()
+{
+    return m_filter;
+}
 
+
 //////////////////////////////////////////////////////////////
 // Serialize data to a stream
 //
@@ -617,6 +625,7 @@
     m_scaleRanges.clear();
     m_featureSourceId = L"";
     m_featureName = L"";
+    m_filter = L"";
     m_schemaName = L"";
 
     MG_TRY()
@@ -662,6 +671,9 @@
             //get the feature name
             m_featureName = vl->GetFeatureName();
 
+            //get the filter
+            m_filter = vl->GetFilter();
+
             //get the geometry property
             m_geometry = vl->GetGeometry();
         }
@@ -687,6 +699,9 @@
             //get the feature name
             m_featureName = gl->GetFeatureName();
 
+            //get the filter
+            m_filter = gl->GetFilter();
+
             //get the geometry property
             m_geometry = gl->GetGeometry();
         }

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h	2009-11-16 17:28:25 UTC (rev 4347)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h	2009-11-17 06:20:32 UTC (rev 4348)
@@ -670,6 +670,26 @@
 
     //////////////////////////////////////////////////////////////////
     /// \brief
+    /// Gets the filter associated with this layer
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// string GetFilter();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// String GetFilter();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// string GetFilter();
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \return
+    /// Returns the filter or an empty string if this layer is not a feature layer or doesn't have filter.
+    ///
+    virtual STRING GetFilter();  /// __get
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
     /// Gets the geometry name associated with this layer which is part of
     /// class definition
     ///
@@ -1035,6 +1055,7 @@
     STRING                m_geometry;
     IdPropertyList        m_idProps;
     bool                  m_forceReadFromServer;
+    STRING                m_filter;
 };
 /// \}
 



More information about the mapguide-commits mailing list