Changes between Version 1 and Version 2 of MapGuideRfc170


Ignore:
Timestamp:
04/24/19 18:17:19 (6 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc170

    v1 v2  
    5353In the Fusion viewer, if it is known that the XYZ tile provider is being used in the CREATERUNTIMEMAP response, it will create an OpenLayers.Layer.XYZ instance to read such tiles instead of the tiled version of OpenLayers.Layer.MapGuide
    5454
     55=== Configurable TileExtentOffset ===
     56
     57In addition to meta-tiling parameters, the (previously-global) {{{TileExtentOffset}}} server configuration property is now available as a tileset-specific parameter.
     58
    5559=== Meta-tiling ===
    5660
     
    5963However, this implementation has not yet been integrated back into trunk so as a result, it has not surfaced as a feature in any release of MapGuide since the RFC was implemented.
    6064
    61 For this RFC, we will take the RFC90 implementation of meta-tiling and retro-fit it into the Tile Set Definition infrastructure.
    62 
    63 Meta-tiling support will be surfaced via new tile set parameters:
     65For this RFC, we will take the RFC90 implementation of meta-tiling and retro-fit it into the new Tile Set Definition infrastructure.
     66
     67Firstly, we will add new {{{RenderTile}}} and {{{RenderTileXYZ}}} primitives that accept a meta-tiling factor:
     68
     69{{{
     70class MG_MAPGUIDE_API MgRenderingService : public MgService
     71{
     72...
     73EXTERNAL_API:
     74    /////////////////////////////////////////////////////////////////
     75    /// \brief
     76    /// Returns the specified base map tile for the given map.
     77    ///
     78    /// \remarks
     79    /// This method only renders the given tile. No tile caching is performed
     80    /// by this method. To render and cache the tile, use the
     81    /// \link MgTileService::GetTile GetTile \endlink method instead. However,
     82    /// using that method will use default tile width/height/dpi/format specified
     83    /// in your MapGuide Server configuration
     84    ///
     85    /// \param map
     86    /// Input
     87    /// map object containing current state of map.
     88    /// \param baseMapLayerGroupName
     89    /// Input
     90    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
     91    /// \param tileColumn
     92    /// Input
     93    /// Specifies the column index of the tile to return.
     94    /// \param tileRow
     95    /// Input
     96    /// Specifies the row index of the tile to return.
     97    /// \param tileWidth
     98    /// Input
     99    /// Specifies the width of the tile to return.
     100    /// \param tileHeight
     101    /// Input
     102    /// Specifies the height of the tile to return.
     103    /// \param tileDpi
     104    /// Input
     105    /// Specifies the dpi the tile to return.
     106    /// \param tileImageFormat
     107    /// Input
     108    /// Specifies the image format of the tile. See \link MgImageFormats \endlink
     109    /// \param tileExtentOffset
     110    /// Specifies the ratio by which the tile to be rendered should be "buffered out". The tile will be rendered at the specified width
     111    /// multiplied by the given ratio, which will be cropped back to the original requested size after rendering. This is to improve
     112    /// label placement on rendered tiles by giving extra "breathing space" to label placement algorithms.
     113    /// \param metaTilingFactor
     114    /// The meta-tiling factor, If less than or equal to 1 no meta-tiling is done. If greater than 1, a tile m times the original requested
     115    /// size is rendered instead (where m is the specified factor)
     116    ///
     117    /// \return
     118    /// A byte reader containing the rendered tile image. If metaTilingFactor is greater than 1, then a raw image frame buffer is returned
     119    /// instead. This raw image frame buffer is not intended to be used by MapGuide applications and is reserved for the rendering infrastructre
     120    /// to sub-divide back into tiles of the original requested size.
     121    ///
     122    /// \since 3.3
     123    virtual MgByteReader* RenderTile(
     124        MgMap* map,
     125        CREFSTRING baseMapLayerGroupName,
     126        INT32 tileColumn,
     127        INT32 tileRow,
     128        INT32 tileWidth,
     129        INT32 tileHeight,
     130        INT32 tileDpi,
     131        CREFSTRING tileImageFormat,
     132        double tileExtentOffset,
     133        INT32 metaTileFactor) = 0;
     134
     135    /////////////////////////////////////////////////////////////////
     136    /// \brief
     137    /// Returns the specified map tile for the given map. Tile structure is
     138    /// based on the XYZ tiling scheme used by Google Maps, OpenStreetMap, and
     139    /// others
     140    ///
     141    /// \param map
     142    /// Input
     143    /// map object containing current state of map.
     144    /// \param baseMapLayerGroupName
     145    /// Input
     146    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
     147    /// \param x
     148    /// Input
     149    /// Specifies the row index of the tile to return.
     150    /// \param y
     151    /// Input
     152    /// Specifies the column index of the tile to return.
     153    /// \param z
     154    /// Input
     155    /// Specifies the zoom level of the tile to return.
     156    /// \param dpi
     157    /// Input
     158    /// Specifies the dpi of the tile to return.
     159    /// \param tileImageFormat
     160    /// Input
     161    /// Specifies the image format of the tile to return.
     162    /// \param tileExtentOffset
     163    /// Specifies the ratio by which the tile to be rendered should be "buffered out". The tile will be rendered at the specified width
     164    /// multiplied by the given ratio, which will be cropped back to the original requested size after rendering. This is to improve
     165    /// label placement on rendered tiles by giving extra "breathing space" to label placement algorithms.
     166    /// \param metaTilingFactor
     167    /// The meta-tiling factor, If less than or equal to 1 no meta-tiling is done. If greater than 1, a tile m times the original requested
     168    /// size is rendered instead (where m is the specified factor)
     169    ///
     170    /// \return
     171    /// A byte reader containing the rendered tile image. If metaTilingFactor is greater than 1, then a raw image frame buffer is returned
     172    /// instead. This raw image frame buffer is not intended to be used by MapGuide applications and is reserved for the rendering infrastructre
     173    /// to sub-divide back into tiles of the original requested size.
     174    ///
     175    /// \since 3.3
     176    virtual MgByteReader* RenderTileXYZ(
     177        MgMap* map,
     178        CREFSTRING baseMapLayerGroupName,
     179        INT32 x,
     180        INT32 y,
     181        INT32 z,
     182        INT32 dpi,
     183        CREFSTRING tileImageFormat,
     184        double tileExtentOffset,
     185        INT32 metaTilingFactor) = 0;
     186};
     187}}}
     188
     189These new overloads are designated {{{EXTERNAL_API}}} because meta-tiles are not intended to be consumed by regular MapGuide applications. They are raw image frame buffers that the rendering infrastructure will use to sub-divide back into tiles of the original requested size. But at the same time, these overloads have to be present in the {{{MgRenderingService}}} contract to allow a server-based tile service to still request meta-tiles through a proxy instance (should a server-based instance not be available) hence the {{{EXTERNAL_API}}} designation.
     190
     191Meta-tiling support will be surfaced via new tile set definition parameters:
    64192
    65193 * {{{MetaTileFactor}}}
    66194 * {{{LockMethod}}}
    67195
     196Meta-tiling has no effect for tile formats that are not image-based (eg. UTFGrid)
     197
    68198=== HTTP caching headers ===
    69199
    70 === Configurable TileExtentOffset ===
    71 
    72 In addition to meta-tiling parameters, the (previously-global) {{{TileExtentOffset}}} server configuration property is now available as a tileset-specific parameter.
    73 
    74200== Implications ==
    75201
     202Tiles generated through meta-tiling may have subtle differences in label placement due to being "cut" from a parent tile that is {{{x}}} times bigger (where {{{x}}} = meta-tiling factor), thus affording the tile renderer more "breathing space" in determining optimal label placement for applicable features that a regular tile would not have.
     203
    76204== Test Plan ==
    77205
     206Add unit tests to render meta-tiles and also render baseline regular tiles for comparison. With the exception of subtle differences in label placement, verify that the tiles cut from meta-tiles are visually the same as regular tiles (esp. Line/Polygon features)
     207
    78208== Funding / Resources ==
    79209