Changes between Version 7 and Version 8 of MapGuideRfc46
- Timestamp:
- 03/19/08 15:13:59 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc46
v7 v8 27 27 == Motivation == 28 28 29 The current MgSelectionBase:: GenerateFilter() API returns a string representing a filter for a set of selected features.29 The current MgSelectionBase::!GenerateFilter() API returns a string representing a filter for a set of selected features. 30 30 31 31 {{{ … … 33 33 }}} 34 34 35 This filter string would look something like: " FeatId = 1109 OR FeatId = 1130 OR FeatId = 2065" such that each of the IDs of the selected features is explicitly specified. The string is then passed as the filter to MgFeatureService::SelectFeatures() to query the datastore.35 This filter string would look something like: "!FeatId = 1109 OR !FeatId = 1130 OR !FeatId = 2065" such that each of the IDs of the selected features is explicitly specified. The string is then passed as the filter to MgFeatureService::!SelectFeatures() to query the datastore. 36 36 37 37 A selection can contain an unlimited number of features, which means that the filter will contain an unlimited number of OR conditions. However, most datastores have a finite number of OR's that can be supported, and some data sources, such as Access databases, are limited to a relatively small number or OR conditions. 38 38 39 Results can be unpredictable when the limit is exceeded due to buffer overruns and/or memory corruption leading to instability in the MapGuide Server. In an effort to improve stability,GenerateFilter() was modified to return a string representing a smaller, but incomplete subset of the total selected features.39 Results can be unpredictable when the limit is exceeded due to buffer overruns and/or memory corruption leading to instability in the !MapGuide Server. In an effort to improve stability, !GenerateFilter() was modified to return a string representing a smaller, but incomplete subset of the total selected features. 40 40 41 41 == Proposed Solution == … … 53 53 == Implications == 54 54 55 Code that currently calls MgSelectionBase:: GenerateFilter() should be updated to use MgSelectionBase::GenerateFilters() instead, and the caller will be required to process all the filters in the collection to correctly query the complete selection set.55 Code that currently calls MgSelectionBase::!GenerateFilter() should be updated to use MgSelectionBase::!GenerateFilters() instead, and the caller will be required to process all the filters in the collection to correctly query the complete selection set. 56 56 57 PHP code example using existing MgSelectionBase:: GenerateFilter() API57 PHP code example using existing MgSelectionBase::!GenerateFilter() API 58 58 {{{ 59 59 $filter = $sel->GenerateFilter($selLayer, $featureClassName); … … 75 75 }}} 76 76 77 PHP code example using NEW MgSelectionBase:: GenerateFilters() API77 PHP code example using NEW MgSelectionBase::!GenerateFilters() API 78 78 {{{ 79 79 $filterCollection = $sel->GenerateFilters($selLayer, $featureClassName, GetMaxSelectionSize()); … … 98 98 }}} 99 99 100 The old GenerateFilter() API should be deprecated. In places where a relatively small number of features are expected in a selection (i.e. less than the value specified by SelectionFilterSize in serverconfig.ini/webconfig.ini), MgSelectionBase::GenerateFilter() may still be safely used to return correct results.100 The old !GenerateFilter() API should be deprecated. In places where a relatively small number of features are expected in a selection (i.e. less than the value specified by !SelectionFilterSize in serverconfig.ini/webconfig.ini), MgSelectionBase::!GenerateFilter() may still be safely used to return correct results. 101 101 102 102 This is a new API which will need to be documented.