| 1 | |
| 2 | = !MapGuide RFC 176 - Update QUERYMAPFEATURES to include selection key with feature attributes = |
| 3 | |
| 4 | This page contains a change request (RFC) for the !MapGuide Open Source project. |
| 5 | More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. |
| 6 | |
| 7 | == Status == |
| 8 | |
| 9 | ||RFC Template Version||(1.0)|| |
| 10 | ||Submission Date||6 Aug 2019|| |
| 11 | ||Last Modified||6 Aug 2019|| |
| 12 | ||Author||Jackie Ng|| |
| 13 | ||RFC Status||ready for review|| |
| 14 | ||Implementation Status||pending|| |
| 15 | ||Proposed Milestone||3.0|| |
| 16 | ||Assigned PSC guide(s)||(when determined)|| |
| 17 | ||'''Voting History'''||(vote date)|| |
| 18 | ||+1|||| |
| 19 | ||+0|||| |
| 20 | ||-0|||| |
| 21 | ||-1|||| |
| 22 | ||no vote|| || |
| 23 | |
| 24 | == Overview == |
| 25 | |
| 26 | This RFC proposes to introduce a new version of `QUERYMAPFEATURES` that includes selection key with feature attributes. |
| 27 | |
| 28 | == Motivation == |
| 29 | |
| 30 | The current `QUERYMAPFEATURES` (v2.6.0) operation allows requesting an XML selection set along with feature attributes for this selection. |
| 31 | |
| 32 | The layout of this response is such that one might think that would be possible to implement viewer features like sub-selection highlighting by using the array index of the feature attributes collection to pick the corresponding selection key from the selection set XML. |
| 33 | |
| 34 | It turns out that, this approach is based on a fatally-flawed assumption that selection set XML is rendered out in the same order as the selected feature attributes. This is actually not the case. |
| 35 | |
| 36 | The result of this incorrect assumption results in bugs such as this one for [https://github.com/jumpinjackie/mapguide-react-layout/issues/804 mapguide-react-layout] where wrong features are being sub-selected with respect to the "current" feature's attributes being displayed on the property palette. |
| 37 | |
| 38 | == Proposed Solution == |
| 39 | |
| 40 | Introduce a new `QUERYMAPFEATURES` v4.0.0 operation. |
| 41 | |
| 42 | This takes the same parameters as its v2.6.0 counterpart, except when requesting feature attributes, the operation will include a `<SelectionKey>` element along side every `<Feature>` element in the selection attribute set. |
| 43 | |
| 44 | This selection key can be used to construct a new selection XML by which a proper sub-selection highlighting can be done. |
| 45 | |
| 46 | Instead of trying to pick the matching selection key by (erroneous) array index lookup in the selection set XML, the selection key is included with every feature's attributes. |
| 47 | |
| 48 | == Implications == |
| 49 | |
| 50 | This is a new operation. |
| 51 | |
| 52 | == Test Plan == |
| 53 | |
| 54 | Verify proper sub-selection is possible with v4.0.0 `QUERYMAPFEATURES` |
| 55 | |
| 56 | == Funding / Resources == |
| 57 | |
| 58 | Community |