Changes between Initial Version and Version 1 of MapGuideRfc137


Ignore:
Timestamp:
Jul 30, 2013, 7:54:06 AM (11 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc137

    v1 v1  
     1
     2= !MapGuide RFC 137 - Describe Runtime Map structure over HTTP =
     3
     4This page contains a change request (RFC) for the !MapGuide Open Source project.
     5More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
     6
     7
     8== Status ==
     9
     10||RFC Template Version||(1.0)||
     11||Submission Date||31 July 2013||
     12||Last Modified||31 July 2013||
     13||Author||Jackie Ng||
     14||RFC Status||draft||
     15||Implementation Status||pending||
     16||Proposed Milestone||2.6||
     17||Assigned PSC guide(s)||(when determined)||
     18||'''Voting History'''||(vote date)||
     19||+1||||
     20||+0||||
     21||-0||||
     22||-1||||
     23||no vote||||
     24
     25== Overview ==
     26
     27This RFC proposes to add support for describing Runtime Maps via the mapagent
     28
     29== Motivation ==
     30
     31While [wiki:MapGuideRfc134 MapGuide RFC 134] solves the problem of client applications not being able to create runtime map instances via the mapagent, that RFC does not support being able to describe the same structure with an existing mapname/sessionid. Client-side viewer functionality such as a viewer legend require the ability to re-interrogate the layer/group structure of the runtime map to rebuild itself to incorporate any layer/group changes made by any server-side logic using the MapGuide Web API.
     32
     33This RFC aims to address this shortcoming.
     34
     35== Proposed Solution ==
     36
     37We'll a new DescribeRuntimeMap API to complement the existing CreateRuntimeMap in MgMappingService:
     38{{{
     39class MG_MAPGUIDE_API MgMappingService : public MgService
     40{
     41PUBLISHED_API:
     42    ////////////////////////////////////////////////////////////////////////////////
     43    /// \brief
     44    /// Returns an XML-based description of the runtime map
     45    ///
     46    /// <!-- Syntax in .Net, Java, and PHP -->
     47    /// \htmlinclude DotNetSyntaxTop.html
     48    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
     49    /// \htmlinclude SyntaxBottom.html
     50    /// \htmlinclude JavaSyntaxTop.html
     51    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
     52    /// \htmlinclude SyntaxBottom.html
     53    /// \htmlinclude PHPSyntaxTop.html
     54    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, int requestedFeatures, int iconsPerScaleRange);
     55    /// \htmlinclude SyntaxBottom.html
     56    ///
     57    /// \param map (MgMap)
     58    /// The map to describe
     59    /// \param requestedFeatures (int)
     60    /// A bitmask representing the desired information to return in the XML response:
     61    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
     62    /// \param iconsPerScaleRange (int)
     63    /// The number of legend icons per scale range to render inline in the XML response as base64 strings.
     64    /// If a scale range contains a number of rules that exceeds this value, only the first and
     65    /// last rules of a type style in the scale range will have inline icons
     66    ///
     67    /// \remarks
     68    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
     69    /// is not specified
     70    ///
     71    /// \return
     72    /// Returns an XML-based description of the runtime map
     73    ///
     74    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
     75                                             INT32 requestedFeatures,
     76                                             INT32 iconsPerScaleRange) = 0;
     77
     78    ////////////////////////////////////////////////////////////////////////////////
     79    /// \brief
     80    /// Returns an XML-based description of the given runtime map
     81    ///
     82    /// <!-- Syntax in .Net, Java, and PHP -->
     83    /// \htmlinclude DotNetSyntaxTop.html
     84    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     85    /// \htmlinclude SyntaxBottom.html
     86    /// \htmlinclude JavaSyntaxTop.html
     87    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, String iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     88    /// \htmlinclude SyntaxBottom.html
     89    /// \htmlinclude PHPSyntaxTop.html
     90    /// virtual MgByteReader DescribeRuntimeMap(MgMap map, string iconFormat, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     91    /// \htmlinclude SyntaxBottom.html
     92    ///
     93    /// \param map (MgMap)
     94    /// The map to describe
     95    /// \param iconFormat (String/string)
     96    /// The desired image format for icons (from MgImageFormats)
     97    /// \param iconWidth (int)
     98    /// The width of each individual inline legend icons. Has no effect if icons was not requested in the response.
     99    /// \param iconHeight (int)
     100    /// The height of each individual inline legend icons. Has no effect if icons was not requested in the response.
     101    /// \param requestedFeatures (int)
     102    /// A bitmask representing the desired information to return in the XML response:
     103    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
     104    /// \param iconsPerScaleRange (int)
     105    /// The number of legend icons per scale range to render inline in the XML response as base64 strings.
     106    /// If a scale range contains a number of rules that exceeds this value, only the first and
     107    /// last rules of a type style in the scale range will have inline icons
     108    ///
     109    /// \remarks
     110    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
     111    /// is not specified
     112    ///
     113    /// \return
     114    /// Returns an XML-based description of the runtime map
     115    ///
     116    /// \exception MgInvalidArgumentException
     117    /// \exception MgNullArgumentException
     118    ///
     119    virtual MgByteReader* DescribeRuntimeMap(MgMap* map,
     120                                             CREFSTRING iconFormat,
     121                                             INT32 iconWidth,
     122                                             INT32 iconHeight,
     123                                             INT32 requestedFeatures,
     124                                             INT32 iconsPerScaleRange) = 0;
     125};
     126}}}
     127
     128Functionality-wise DescribeRuntimeMap returns the same XML structure as the CreateRuntimeMap. See [wiki:MapGuideRfc134] for all the sample responses.
     129
     130Like CREATERUNTIMEMAP, we'll also introduce a new operation to the mapagent: DESCRIBERUNTIMEMAP
     131
     132This new operation has the following parameters (in addition to the standard OPERATION, VERSION, LOCALE, SESSION, USERNAME, PASSWORD and FORMAT parameters)
     133
     134||Name||Description||Required||
     135||MAPNAME||The map name of the runtime map to describe the structure of||Yes||
     136||REQUESTEDFEATURES||A bitmask specifying what pieces of information to includein the DESCRIBERUNTIMEMAP response||No||
     137||ICONSPERSCALERANGE||The number of icons to render inline (as base64 images) per scale range in each layer of the map||No||
     138||ICONFORMAT||The icon image format (default: PNG)||No||
     139||ICONWIDTH||The width of each inline icon that will be rendered (default: 16)||No||
     140||ICONHEIGHT||The height of each inline icon that will be rendered (default: 16)||No||
     141
     142All parameters behave like its CREATERUNTIMEMAP counterpart.
     143
     144== Implications ==
     145
     146This is a brand new API. There are no compatibility issues.
     147
     148The Fusion viewer will use this API for rebuilding its Legend structure (for widgets like Buffer/Redline that add layers/groups).
     149
     150== Test Plan ==
     151
     152Test the operation after a CREATERUNTIMEMAP operation (using its mapname/sessionID) and verify responses are the same.
     153
     154Test that various layer/group changes in a MgMap are reflected in its XML structure when running a DescribeRuntimeMap on it.
     155
     156== Funding / Resources ==
     157
     158Community