Version 5 (modified by 17 years ago) ( diff ) | ,
---|
MapGuide RFC 33 - Convenience Methods for Selection
This page contains an change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.
Status
RFC Template Version | 1.0 |
Submission Date | September 5, 2007 |
Last Modified | trevorwekel Timestamp |
Author | Trevor Wekel |
RFC Status | draft |
Implementation Status | pending |
Proposed Milestone | 2.0 |
Assigned PSC guide(s) | |
Voting History | September 5, 2007 |
+1 | |
+0 | |
-0 | |
-1 |
Overview
This RFC adds convenience methods to MgSelection so that selected features can be obtained in a more straightforward fashion.
Motivation
The existing MgSelection API does not provide easy access to the selected features and is a bit of a hassle to use.
Proposed Solution
Implement three new methods for MgSelection through MgSelectionBase
/// Returns the number of selected features for the specified feature class. /// /// Input parameters /// layer: Input layer, className: Feature class name /// /// Returns a count of all selected features /// INT32 GetSelectedFeaturesCount(MgLayerBase* layer, CREFSTRING className);
/// Returns the selected feature data for the specified feature class. /// /// Input parameters /// layer: Input layer, className: Feature class name /// mappedOnly: return mapped (true) or all (false) properties for selected features /// /// Returns a feature reader containing all the features for the given /// feature class in this selection. /// MgFeatureReader* GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, bool mappedOnly);
/// Returns the selected feature data for the specified feature class. /// /// Input parameters /// layer: Input layer, className: Feature class name /// propertyNames: properties to return for selected features /// /// Returns a feature reader containing all the features for the given /// feature class in this selection. /// MgFeatureReader* GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className, MgStringCollection* propertyNames);
These methods will be implemented using existing MgSelection and MgLayer functionality.
Implications
None. These are new API additions so backward compatibility is maintained. Documentation will be autogenerated from the header file.
Test Plan
Validate that new APIs function correctly by returning the correct features and count. Perform visual testing with the existing sample applications to ensure that the existing MgSelection APIs are still functioning correctly.
Funding/Resources
Autodesk will providing funding and resources.