wiki:MapGuideRfc33

Version 3 (modified by trevorwekel, 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 Version1.0
Submission DateSeptember 5, 2007
Last Modifiedtrevorwekel Timestamp
AuthorTrevor Wekel
RFC Statusdraft
Implementation Statuspending
Proposed Milestone2.0
Assigned PSC guide(s)
Voting HistorySeptember 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 two new methods for MgSelection

/// 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
///
int GetSelectedFeaturesCount(MgLayerBase* layer, CREFSTRING className);
/// Returns the selected feature data for the specified feature class.
///
/// Input parameters
/// layer: Input layer, className: Feature class name
///
/// Returns a feature reader containing all the features for the given 
/// feature class in this selection.
///
MgFeatureReader* GetSelectedFeatures(MgLayerBase* layer, CREFSTRING className);

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

Note: See TracWiki for help on using the wiki.