Changes between Version 7 and Version 8 of MapGuideRfc126


Ignore:
Timestamp:
May 5, 2013, 10:00:50 AM (11 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc126

    v7 v8  
    190190Depending 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.
    191191
    192 Here's a rectangular selection query would look like this (note the value of REQUESTDATA):
     192A rectangular selection query (assuming no support for data URIs) would look like this (note the value of REQUESTDATA):
     193
     194{{{
     195OPERATION:QUERYMAPFEATURES
     196VERSION:2.6.0
     197PERSIST:1
     198MAPNAME:Sheboygan
     199SESSION:2da80b84-b5a1-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04
     200SEQ:0.5907083495985717
     201LAYERNAMES:Parcels
     202GEOMETRY:POLYGON((-87.71863496334385 43.74829197543962, -87.71830632635577 43.74829197543962, -87.71830632635577 43.747986812522115, -87.71863496334385 43.747986812522115, -87.71863496334385 43.74829197543962))
     203SELECTIONVARIANT:INTERSECTS
     204CLIENTAGENT:Ajax Viewer
     205REQUESTDATA:1
     206SELECTIONCOLOR:0x0000FFFF
     207SELECTIONFORMAT:PNG
     208MAXFEATURES:-1
     209}}}
     210
     211Or if the browser supports data URIs (note the value of REQUESTDATA):
    193212
    194213{{{
     
    209228}}}
    210229
    211 Or if the browser supports data URIs (note the value of REQUESTDATA):
    212 
    213 {{{
    214 OPERATION:QUERYMAPFEATURES
    215 VERSION:2.6.0
    216 PERSIST:1
    217 MAPNAME:Sheboygan
    218 SESSION:2da80b84-b5a1-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04
    219 SEQ:0.5907083495985717
    220 LAYERNAMES:Parcels
    221 GEOMETRY:POLYGON((-87.71863496334385 43.74829197543962, -87.71830632635577 43.74829197543962, -87.71830632635577 43.747986812522115, -87.71863496334385 43.747986812522115, -87.71863496334385 43.74829197543962))
    222 SELECTIONVARIANT:INTERSECTS
    223 CLIENTAGENT:Ajax Viewer
    224 REQUESTDATA:1
    225 SELECTIONCOLOR:0x0000FFFF
    226 SELECTIONFORMAT:PNG
    227 MAXFEATURES:-1
    228 }}}
    229 
    230230And produces a response like this (without inline selection):
    231231
     
    300300The 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.
    301301
     302Because 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
    302304For 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.
    303305