Changes between Version 4 and Version 5 of MapGuideRfc134


Ignore:
Timestamp:
May 15, 2013, 11:36:25 AM (11 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc134

    v4 v5  
    4242== Proposed Solution ==
    4343
    44 We introduce a new operation to the mapagent: CREATERUNTIMEMAP
     44We'll introduce new APIs for MgMappingService:
     45{{{
     46class MG_MAPGUIDE_API MgMappingService : public MgService
     47{
     48PUBLISHED_API:
     49    ////////////////////////////////////////////////////////////////////////////////
     50    /// \brief
     51    /// Creates a new runtime map from the specified Map Definition resource id and returns an XML-based description of the runtime
     52    /// map
     53    ///
     54    /// <!-- Syntax in .Net, Java, and PHP -->
     55    /// \htmlinclude DotNetSyntaxTop.html
     56    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int requestedFeatures, int iconsPerScaleRange);
     57    /// \htmlinclude SyntaxBottom.html
     58    /// \htmlinclude JavaSyntaxTop.html
     59    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int requestedFeatures, int iconsPerScaleRange);
     60    /// \htmlinclude SyntaxBottom.html
     61    /// \htmlinclude PHPSyntaxTop.html
     62    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int requestedFeatures, int iconsPerScaleRange);
     63    /// \htmlinclude SyntaxBottom.html
     64    ///
     65    /// \param mapDefinition (MgResourceIdentifier)
     66    /// MgResourceIdentifier object identifying the map definition resource.
     67    /// \param requestedFeatures (int)
     68    /// A bitmask representing the desired information to return in the XML response:
     69    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
     70    /// \param iconsPerScaleRange (int)
     71    /// The number of legend icons per scale range to render inline in the XML response as base64 strings.
     72    /// If a scale range contains a number of rules that exceeds this value, only the first and
     73    /// last rules of a type style in the scale range will have inline icons
     74    ///
     75    /// \remarks
     76    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
     77    /// is not specified
     78    ///
     79    /// \return
     80    /// Returns an XML-based description of the runtime map
     81    ///
     82    virtual MgByteReader* CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
     83                                           CREFSTRING sessionId,
     84                                           INT32 requestedFeatures,
     85                                           INT32 iconsPerScaleRange) = 0;
     86
     87    ////////////////////////////////////////////////////////////////////////////////
     88    /// \brief
     89    /// Creates a new runtime map from the specified Map Definition resource id and returns an XML-based description of the runtime
     90    /// map
     91    ///
     92    /// <!-- Syntax in .Net, Java, and PHP -->
     93    /// \htmlinclude DotNetSyntaxTop.html
     94    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     95    /// \htmlinclude SyntaxBottom.html
     96    /// \htmlinclude JavaSyntaxTop.html
     97    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     98    /// \htmlinclude SyntaxBottom.html
     99    /// \htmlinclude PHPSyntaxTop.html
     100    /// virtual MgByteReader CreateRuntimeMap(MgResourceIdentifier mapDefinition, int iconWidth, int iconHeight, int requestedFeatures, int iconsPerScaleRange);
     101    /// \htmlinclude SyntaxBottom.html
     102    ///
     103    /// \param mapDefinition (MgResourceIdentifier)
     104    /// MgResourceIdentifier object identifying the map definition resource.
     105    /// \param targetMapName (String/string)
     106    /// The desired name of the runtime map
     107    /// \param sessionId (String/string)
     108    /// The session ID
     109    /// \param iconWidth (int)
     110    /// The width of each individual inline legend icons. Has no effect if icons was not requested in the response.
     111    /// \param iconHeight (int)
     112    /// The height of each individual inline legend icons. Has no effect if icons was not requested in the response.
     113    /// \param requestedFeatures (int)
     114    /// A bitmask representing the desired information to return in the XML response:
     115    /// 1=Layer/Group structure, 2=Layer Icons, 4=Layer Feature Source Information
     116    /// \param iconsPerScaleRange (int)
     117    /// The number of legend icons per scale range to render inline in the XML response as base64 strings.
     118    /// If a scale range contains a number of rules that exceeds this value, only the first and
     119    /// last rules of a type style in the scale range will have inline icons
     120    ///
     121    /// \remarks
     122    /// The bitmask values of 2 (Layer Icons) and 4 (Layer Feature Source Information) have no effect if 1 (Layer/Group structure)
     123    /// is not specified
     124    ///
     125    /// \return
     126    /// Returns an XML-based description of the runtime map
     127    ///
     128    virtual MgByteReader* CreateRuntimeMap(MgResourceIdentifier* mapDefinition,
     129                                           CREFSTRING targetMapName,
     130                                           CREFSTRING sessionId,
     131                                           INT32 iconWidth,
     132                                           INT32 iconHeight,
     133                                           INT32 requestedFeatures,
     134                                           INT32 iconsPerScaleRange) = 0;
     135};
     136}}}
     137
     138The ability to create MgMap objects on the server-tier is actually not a supported usage scenario. MgMaps are usually created on the web-tier. To support server-tier creation of MgMap objects, we need a new supporting API in MgSelection that allows direct plugging of the session id, instead of letting it try to fetch a non-existent MgUserInformation from our *server-based* MgResourceService:
     139{{{
     140class MG_MAPGUIDE_API MgSelection : public MgSelectionBase
     141{
     142INTERNAL_API:
     143    void Save(MgResourceService* resourceService, CREFSTRING sessionId, CREFSTRING mapName);
     144};
     145}}}
     146
     147We'll also introduce a new operation to the mapagent: CREATERUNTIMEMAP
    45148
    46149This new operation has the following parameters (in addition to the standard OPERATION, VERSION, LOCALE, SESSION, USERNAME, PASSWORD and FORMAT parameters)
     
    50153||REQUESTEDFEATURES||A bitmask specifying what pieces of information to includein the CREATERUNTIMEMAP response||No||
    51154||ICONSPERSCALERANGE||The number of icons to render inline (as base64 images) per scale range in each layer of the map||No||
     155||ICONWIDTH||The width of each inline icon that will be rendered (default: 16)||No||
     156||ICONHEIGHT||The height of each inline icon that will be rendered (default: 16)||No||
    52157
    53158The REQUESTEDFEATURES parameters can be logically ORed with the following values: