MapGuide RFC 176 - Update QUERYMAPFEATURES to include selection key with feature attributes

This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.


RFC Template Version(1.0)
Submission Date6 Aug 2019
Last Modified7 Aug 2019
AuthorJackie Ng
RFC Statusadopted
Implementation Statusimplemented
Proposed Milestone4.0
Assigned PSC guide(s)(when determined)
Voting History(vote date)
no vote


This RFC proposes to introduce a new version of QUERYMAPFEATURES that includes selection key with feature attributes.


The current QUERYMAPFEATURES (v2.6.0) operation allows requesting an XML selection set along with feature attributes for this selection.

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.

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.

The result of this incorrect assumption results in bugs such as this one for mapguide-react-layout where wrong features are being sub-selected with respect to the "current" feature's attributes being displayed on the property palette.

Proposed Solution

Introduce a new QUERYMAPFEATURES v4.0.0 operation.

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.

This selection key can be used to construct a new selection XML by which a proper sub-selection highlighting can be done.

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.

This new operation is already implemented in the querymapfeatures_selectionkey sandbox. Upon adoption of this RFC, it will be merged into trunk.


This is a new operation.

Test Plan

Verify proper sub-selection is possible with v4.0.0 QUERYMAPFEATURES

Funding / Resources


Last modified 5 years ago Last modified on Aug 7, 2019, 5:09:15 AM
Note: See TracWiki for help on using the wiki.