Changes between Version 7 and Version 8 of MapGuideRfc126
- Timestamp:
- 05/05/13 10:00:50 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc126
v7 v8 190 190 Depending on the requestData masked value, we will have a {{{MgFeatureInformation}}} (containing the tooltip, hyperlink and selection set), a {{{MgBatchPropertyCollection}}} containing the selected feature attributes and a {{{STRING}}} (containing the base64 selection image). Then we construct the appropriate XML response based on what pieces of data we have. 191 191 192 Here's a rectangular selection query would look like this (note the value of REQUESTDATA): 192 A rectangular selection query (assuming no support for data URIs) would look like this (note the value of REQUESTDATA): 193 194 {{{ 195 OPERATION:QUERYMAPFEATURES 196 VERSION:2.6.0 197 PERSIST:1 198 MAPNAME:Sheboygan 199 SESSION:2da80b84-b5a1-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04 200 SEQ:0.5907083495985717 201 LAYERNAMES:Parcels 202 GEOMETRY:POLYGON((-87.71863496334385 43.74829197543962, -87.71830632635577 43.74829197543962, -87.71830632635577 43.747986812522115, -87.71863496334385 43.747986812522115, -87.71863496334385 43.74829197543962)) 203 SELECTIONVARIANT:INTERSECTS 204 CLIENTAGENT:Ajax Viewer 205 REQUESTDATA:1 206 SELECTIONCOLOR:0x0000FFFF 207 SELECTIONFORMAT:PNG 208 MAXFEATURES:-1 209 }}} 210 211 Or if the browser supports data URIs (note the value of REQUESTDATA): 193 212 194 213 {{{ … … 209 228 }}} 210 229 211 Or if the browser supports data URIs (note the value of REQUESTDATA):212 213 {{{214 OPERATION:QUERYMAPFEATURES215 VERSION:2.6.0216 PERSIST:1217 MAPNAME:Sheboygan218 SESSION:2da80b84-b5a1-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04219 SEQ:0.5907083495985717220 LAYERNAMES:Parcels221 GEOMETRY:POLYGON((-87.71863496334385 43.74829197543962, -87.71830632635577 43.74829197543962, -87.71830632635577 43.747986812522115, -87.71863496334385 43.747986812522115, -87.71863496334385 43.74829197543962))222 SELECTIONVARIANT:INTERSECTS223 CLIENTAGENT:Ajax Viewer224 REQUESTDATA:1225 SELECTIONCOLOR:0x0000FFFF226 SELECTIONFORMAT:PNG227 MAXFEATURES:-1228 }}}229 230 230 And produces a response like this (without inline selection): 231 231 … … 300 300 The AJAX viewer will need some slight modifications to deal with the new QUERYMAPFEATURES response as the structure differs from what is returned by getselectedfeatures.[php/jsp/aspx], but the content is the same. Selected features can be grouped by layer name and each individual selected feature has a bounding box for the "Zoom to current feature" function to work. If data URIs are supported, the viewer needs to simply check the content of the {{{InlineSelectionImage}}} property in the response. If it is not empty, it can be assigned straight into the {{{<img>}}} element that holds the selection image, otherwise we proceeed as normal and send off a GETDYNAMICMAPOVERLAYIMAGE request for that image. With the implementation of this RFC, getselectedfeatures.[php/jsp/ajax] will no longer be required and can be removed. 301 301 302 Because we have the bounding box of individual features client-side, we gain an additional benefit by eliminating a GETFEATURESETENVELOPE request for the "Zoom to Selection" command, as we can instead compute the aggregate bounding box based on the bounding boxes of our selected features and use that instead for calculating the desired zoom level/location. 303 302 304 For Fusion, it gets a bit more complicated as it makes various calls to assorted PHP scripts (SaveSelection.php, GetSelectionProperties.php, etc). This asynchronous call chain of PHP scripts needs to be refactored so that it only needs to send the new QUERYMAPFEATURES request and process its response as it does all the things that these PHP scripts were previously needed for. In addition, it's client-side selection structure is radically different from that of the AJAX viewer. Given the very early stage of this RFC, discussion with Fusion developers is needed to determine if the sample responses proposed here is enough to replicate the existing client-side selection model and this RFC will be updated accordingly based on developer feedback. 303 305