[mapguide-commits] r8282 - sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Jul 4 04:38:43 PDT 2014
Author: jng
Date: 2014-07-04 04:38:43 -0700 (Fri, 04 Jul 2014)
New Revision: 8282
Modified:
sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.cpp
sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.h
Log:
Add overload of UpdateFeatures() with MgTransaction support to mg-desktop's implementation of MgLayerBase
Modified: sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.cpp
===================================================================
--- sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.cpp 2014-07-04 11:36:55 UTC (rev 8281)
+++ sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.cpp 2014-07-04 11:38:43 UTC (rev 8282)
@@ -378,6 +378,24 @@
return propCol.Detach();
}
+MgPropertyCollection* MgdLayer::UpdateFeatures(MgFeatureCommandCollection* commands, MgTransaction* trans)
+{
+ Ptr<MgPropertyCollection> propCol;
+
+ MG_TRY()
+
+ Ptr<MgResourceIdentifier> resourceId = new MgResourceIdentifier(m_featureSourceId);
+
+ Ptr<MgFeatureService> featureService = dynamic_cast<MgFeatureService*>(
+ GetMap()->GetService(MgServiceType::FeatureService));
+
+ propCol = featureService->UpdateFeatures(resourceId, commands, trans);
+
+ MG_CATCH_AND_THROW(L"MgdLayer.UpdateFeatures")
+
+ return propCol.Detach();
+}
+
MgTransaction* MgdLayer::BeginTransaction()
{
Ptr<MgTransaction> trans;
Modified: sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.h
===================================================================
--- sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.h 2014-07-04 11:36:55 UTC (rev 8281)
+++ sandbox/jng/convenience_apis/Desktop/MgDesktop/MapLayer/Layer.h 2014-07-04 11:38:43 UTC (rev 8282)
@@ -23,6 +23,8 @@
virtual MgPropertyCollection* UpdateFeatures(MgFeatureCommandCollection* commands);
+ virtual MgPropertyCollection* UpdateFeatures(MgFeatureCommandCollection* commands, MgTransaction* trans);
+
virtual MgTransaction* BeginTransaction();
virtual MgdScrollableFeatureReader* SelectFeaturesExtended(MgFeatureQueryOptions* options);
More information about the mapguide-commits
mailing list