[mapguide-commits] r8174 - in sandbox/jng/tiling: Common/MapGuideCommon/Services Server/src/Services/Rendering Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu May 29 09:06:16 PDT 2014


Author: jng
Date: 2014-05-29 09:06:16 -0700 (Thu, 29 May 2014)
New Revision: 8174

Modified:
   sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.cpp
   sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.h
   sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingDefs.h
   sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingService.h
   sandbox/jng/tiling/Server/src/Services/Rendering/OpRenderTile.cpp
   sandbox/jng/tiling/Server/src/Services/Rendering/RenderingOperationFactory.cpp
   sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.cpp
   sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.h
   sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj
   sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj.filters
   sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingServiceBuild.cpp
   sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.cpp
   sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.h
Log:
Add new APIs to MgRenderingService:
 - RenderTile overload that accepts tile width, tile height, tile dpi and tile image format.
 - RenderTileXYZ, allows rendering of tiled maps as XYZ tiles similar to Google Maps, OSM and similar maps.

New unit tests added to exercise these APIs.

Modified: sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.cpp
===================================================================
--- sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -106,7 +106,92 @@
     return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
 }
 
+MgByteReader* MgProxyRenderingService::RenderTile(
+    MgMap* map,
+    CREFSTRING baseMapLayerGroupName,
+    INT32 tileColumn,
+    INT32 tileRow,
+    INT32 tileWidth,
+    INT32 tileHeight,
+    INT32 tileDpi,
+    CREFSTRING tileImageFormat)
+{
+    MgCommand cmd;
+    cmd.ExecuteCommand(m_connProp,                                      // Connection
+                        MgCommand::knObject,                            // Return type expected
+                        MgRenderingServiceOpId::RenderTile2,            // Command Code
+                        8,                                              // No of arguments
+                        Rendering_Service,                              // Service Id
+                        BUILD_VERSION(3,0,0),                           // Operation version
+                        MgCommand::knObject, map,                       // Argument#1
+                        MgCommand::knString, &baseMapLayerGroupName,    // Argument#2
+                        MgCommand::knInt32, tileColumn,                 // Argument#3
+                        MgCommand::knInt32, tileRow,                    // Argument#4
+                        MgCommand::knInt32, tileWidth,                  // Argument#5
+                        MgCommand::knInt32, tileHeight,                 // Argument#6
+                        MgCommand::knInt32, tileDpi,                    // Argument#7
+                        MgCommand::knString, &tileImageFormat,          // Argument#8
+                        MgCommand::knNone);                             // End of arguments
 
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
+}
+
+MgByteReader* MgProxyRenderingService::RenderTileXYZ(MgMap* map,
+                                                     CREFSTRING baseMapLayerGroupName,
+                                                     INT32 x,
+                                                     INT32 y,
+                                                     INT32 z)
+{
+    MgCommand cmd;
+    cmd.ExecuteCommand(m_connProp,                                      // Connection
+                        MgCommand::knObject,                            // Return type expected
+                        MgRenderingServiceOpId::RenderTileXYZ,          // Command Code
+                        5,                                              // No of arguments
+                        Rendering_Service,                              // Service Id
+                        BUILD_VERSION(3,0,0),                           // Operation version
+                        MgCommand::knObject, map,                       // Argument#1
+                        MgCommand::knString, &baseMapLayerGroupName,    // Argument#2
+                        MgCommand::knInt32, x,                          // Argument#3
+                        MgCommand::knInt32, y,                          // Argument#4
+                        MgCommand::knInt32, z,                          // Argument#5
+                        MgCommand::knNone);                             // End of arguments
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
+}
+
+MgByteReader* MgProxyRenderingService::RenderTileXYZ(MgMap* map,
+                                                     CREFSTRING baseMapLayerGroupName,
+                                                     INT32 x,
+                                                     INT32 y,
+                                                     INT32 z,
+                                                     INT32 dpi,
+                                                     CREFSTRING tileImageFormat)
+{
+    MgCommand cmd;
+    cmd.ExecuteCommand(m_connProp,                                      // Connection
+                        MgCommand::knObject,                            // Return type expected
+                        MgRenderingServiceOpId::RenderTileXYZ2,         // Command Code
+                        7,                                              // No of arguments
+                        Rendering_Service,                              // Service Id
+                        BUILD_VERSION(3,0,0),                           // Operation version
+                        MgCommand::knObject, map,                       // Argument#1
+                        MgCommand::knString, &baseMapLayerGroupName,    // Argument#2
+                        MgCommand::knInt32, x,                          // Argument#3
+                        MgCommand::knInt32, y,                          // Argument#4
+                        MgCommand::knInt32, z,                          // Argument#5
+                        MgCommand::knInt32, dpi,                        // Argument#6
+                        MgCommand::knInt32, &tileImageFormat,           // Argument#7
+                        MgCommand::knNone);                             // End of arguments
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgByteReader*)cmd.GetReturnValue().val.m_obj;
+}
+
 /////////////////////////////////////////////////////////////////
 /// <summary>
 /// Renders all dynamic layers in the specified MgMap to a dynamic overlay image

Modified: sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.h
===================================================================
--- sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.h	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Common/MapGuideCommon/Services/ProxyRenderingService.h	2014-05-29 16:06:16 UTC (rev 8174)
@@ -58,6 +58,127 @@
 
     /////////////////////////////////////////////////////////////////
     /// \brief
+    /// Returns the specified base map tile for the given map.
+    ///
+    /// \remarks
+    /// This method only renders the given tile. No tile caching is performed
+    /// by this method. To render and cache the tile, use the 
+    /// \link MgTileService::GetTile GetTile \endlink method instead. However,
+    /// using that method will use default tile width/height/dpi/format specified
+    /// in your MapGuide Server configuration
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param tileColumn
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param tileRow
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param tileWidth
+    /// Input
+    /// Specifies the width of the tile to return.
+    /// \param tileHeight
+    /// Input
+    /// Specifies the height of the tile to return.
+    /// \param tileDpi
+    /// Input
+    /// Specifies the dpi the tile to return.
+    /// \param tileImageFormat
+    /// Input
+    /// Specifies the image format of the tile. See \link MgImageFormats \endlink
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTile(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 tileColumn,
+        INT32 tileRow,
+        INT32 tileWidth,
+        INT32 tileHeight,
+        INT32 tileDpi,
+        CREFSTRING tileImageFormat);
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the specified map tile for the given map. Tile structure is
+    /// based on the XYZ tiling scheme used by Google Maps, OpenStreetMap, and
+    /// others
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param x
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param y
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param z
+    /// Input
+    /// Specifies the zoom level of the tile to return.
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTileXYZ(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 x,
+        INT32 y,
+        INT32 z);
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the specified map tile for the given map. Tile structure is
+    /// based on the XYZ tiling scheme used by Google Maps, OpenStreetMap, and
+    /// others
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param x
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param y
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param z
+    /// Input
+    /// Specifies the zoom level of the tile to return.
+    /// \param dpi
+    /// Input
+    /// Specifies the dpi of the tile to return.
+    /// \param tileImageFormat
+    /// Input
+    /// Specifies the image format of the tile to return.
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTileXYZ(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 x,
+        INT32 y,
+        INT32 z,
+        INT32 dpi,
+        CREFSTRING tileImageFormat);
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
     /// Renders all dynamic layers in the specified MgMap to a dynamic overlay image
     /// with a transparent background. The center, scale, size, and layers to be
     /// rendered are defined by the specified map instance.  The format parameter

Modified: sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingDefs.h
===================================================================
--- sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingDefs.h	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingDefs.h	2014-05-29 16:06:16 UTC (rev 8174)
@@ -40,6 +40,9 @@
     static const int RenderDynamicOverlay2      = 0x1111E90C;
     static const int RenderMap5                 = 0x1111E90D;
     static const int QueryFeatureProperties2    = 0x1111E90E;
+    static const int RenderTile2                = 0x1111E90F;
+    static const int RenderTileXYZ              = 0x1111E910;
+    static const int RenderTileXYZ2             = 0x1111E911;
 };
 /// \endcond
 

Modified: sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingService.h
===================================================================
--- sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingService.h	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Common/MapGuideCommon/Services/RenderingService.h	2014-05-29 16:06:16 UTC (rev 8174)
@@ -70,6 +70,127 @@
 
     /////////////////////////////////////////////////////////////////
     /// \brief
+    /// Returns the specified base map tile for the given map.
+    ///
+    /// \remarks
+    /// This method only renders the given tile. No tile caching is performed
+    /// by this method. To render and cache the tile, use the 
+    /// \link MgTileService::GetTile GetTile \endlink method instead. However,
+    /// using that method will use default tile width/height/dpi/format specified
+    /// in your MapGuide Server configuration
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param tileColumn
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param tileRow
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param tileWidth
+    /// Input
+    /// Specifies the width of the tile to return.
+    /// \param tileHeight
+    /// Input
+    /// Specifies the height of the tile to return.
+    /// \param tileDpi
+    /// Input
+    /// Specifies the dpi the tile to return.
+    /// \param tileImageFormat
+    /// Input
+    /// Specifies the image format of the tile. See \link MgImageFormats \endlink
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTile(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 tileColumn,
+        INT32 tileRow,
+        INT32 tileWidth,
+        INT32 tileHeight,
+        INT32 tileDpi,
+        CREFSTRING tileImageFormat) = 0;
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the specified map tile for the given map. Tile structure is
+    /// based on the XYZ tiling scheme used by Google Maps, OpenStreetMap, and
+    /// others
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param x
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param y
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param z
+    /// Input
+    /// Specifies the zoom level of the tile to return.
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTileXYZ(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 x,
+        INT32 y,
+        INT32 z) = 0;
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Returns the specified map tile for the given map. Tile structure is
+    /// based on the XYZ tiling scheme used by Google Maps, OpenStreetMap, and
+    /// others
+    ///
+    /// \param map
+    /// Input
+    /// map object containing current state of map.
+    /// \param baseMapLayerGroupName
+    /// Input
+    /// Specifies the name of the baseMapLayerGroup for which to render the tile.
+    /// \param x
+    /// Input
+    /// Specifies the row index of the tile to return.
+    /// \param y
+    /// Input
+    /// Specifies the column index of the tile to return.
+    /// \param z
+    /// Input
+    /// Specifies the zoom level of the tile to return.
+    /// \param dpi
+    /// Input
+    /// Specifies the dpi of the tile to return.
+    /// \param tileImageFormat
+    /// Input
+    /// Specifies the image format of the tile to return.
+    ///
+    /// \return
+    /// A byte reader containing the rendered tile image.
+    ///
+    virtual MgByteReader* RenderTileXYZ(
+        MgMap* map,
+        CREFSTRING baseMapLayerGroupName,
+        INT32 x,
+        INT32 y,
+        INT32 z,
+        INT32 dpi,
+        CREFSTRING tileImageFormat) = 0;
+
+    /////////////////////////////////////////////////////////////////
+    /// \brief
     /// Renders all dynamic layers in the specified MgMap to a dynamic overlay image
     /// with a transparent background. The center, scale, size, and layers to be
     /// rendered are defined by the specified map instance.  The format parameter

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/OpRenderTile.cpp
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/OpRenderTile.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/OpRenderTile.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -94,6 +94,60 @@
 
         EndExecution(byteReader);
     }
+    else if (8 == m_packet.m_NumArguments)
+    {
+        Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
+        Ptr<MgResourceIdentifier> resource = map->GetResourceId();
+        map->SetDelayedLoadResourceService(m_resourceService);
+
+        STRING baseMapLayerGroupName;
+        m_stream->GetString(baseMapLayerGroupName);
+
+        INT32 tileCol = 0;
+        m_stream->GetInt32(tileCol);
+
+        INT32 tileRow = 0;
+        m_stream->GetInt32(tileRow);
+
+        INT32 tileWidth = 0;
+        m_stream->GetInt32(tileWidth);
+
+        INT32 tileHeight = 0;
+        m_stream->GetInt32(tileHeight);
+
+        INT32 tileDpi = 0;
+        m_stream->GetInt32(tileDpi);
+
+        STRING tileImageFormat;
+        m_stream->GetString(tileImageFormat);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(baseMapLayerGroupName.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileCol);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileRow);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileWidth);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileHeight);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileDpi);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(tileImageFormat.c_str());
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgByteReader> byteReader =
+            m_service->RenderTile(map, baseMapLayerGroupName, tileCol, tileRow, tileWidth, tileHeight, tileDpi, tileImageFormat);
+
+        EndExecution(byteReader);
+    }
     else
     {
         MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/RenderingOperationFactory.cpp
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/RenderingOperationFactory.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/RenderingOperationFactory.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -73,6 +73,42 @@
         }
         break;
 
+    case MgRenderingServiceOpId::RenderTile2:
+        switch (VERSION_NO_PHASE(operationVersion))
+        {
+        case VERSION_SUPPORTED(3,0):
+            handler.reset(new MgOpRenderTile());
+            break;
+        default:
+            throw new MgInvalidOperationVersionException(
+                L"MgRenderingOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
+        }
+        break;
+
+    case MgRenderingServiceOpId::RenderTileXYZ:
+        switch (VERSION_NO_PHASE(operationVersion))
+        {
+        case VERSION_SUPPORTED(3,0):
+            handler.reset(new MgOpRenderTileXYZ());
+            break;
+        default:
+            throw new MgInvalidOperationVersionException(
+                L"MgRenderingOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
+        }
+        break;
+
+    case MgRenderingServiceOpId::RenderTileXYZ2:
+        switch (VERSION_NO_PHASE(operationVersion))
+        {
+        case VERSION_SUPPORTED(3,0):
+            handler.reset(new MgOpRenderTileXYZ());
+            break;
+        default:
+            throw new MgInvalidOperationVersionException(
+                L"MgRenderingOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
+        }
+        break;
+
     case MgRenderingServiceOpId::RenderDynamicOverlay:
         switch (VERSION_NO_PHASE(operationVersion))
         {
@@ -85,6 +121,7 @@
                 L"MgRenderingOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
         }
         break;
+
     case MgRenderingServiceOpId::RenderDynamicOverlay2:
         switch (VERSION_NO_PHASE(operationVersion))
         {

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -29,12 +29,14 @@
 #include "LegendPlotUtil.h"
 #include "TransformCache.h"
 #include "Box2D.h"
+#include <cmath>
 
 // Profile
 #include "ProfileRenderMapResult.h"
 
+#define XYZ_TILE_WIDTH 256
+#define XYZ_TILE_HEIGHT 256
 
-
 // the maximum number of allowed pixels for rendered images
 static const INT32 MAX_PIXELS = 16384*16384;
 static const INT32 FILTER_VISIBLE = 1;
@@ -150,6 +152,33 @@
 
     MG_TRY()
 
+    ret = RenderTile(map, 
+                     baseMapLayerGroupName,
+                     tileColumn,
+                     tileRow,
+                     MgTileParameters::tileWidth,
+                     MgTileParameters::tileHeight,
+                     MgTileParameters::tileDPI,
+                     MgTileParameters::tileFormat);
+
+    MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderTile")
+
+    return ret.Detach();
+}
+
+MgByteReader* MgServerRenderingService::RenderTile(MgMap* map,
+                                                   CREFSTRING baseMapLayerGroupName,
+                                                   INT32 tileColumn,
+                                                   INT32 tileRow,
+                                                   INT32 tileWidth,
+                                                   INT32 tileHeight,
+                                                   INT32 tileDpi,
+                                                   CREFSTRING tileImageFormat)
+{
+    Ptr<MgByteReader> ret;
+
+    MG_TRY()
+
     if (NULL == map || baseMapLayerGroupName.empty())
         throw new MgNullArgumentException(L"MgServerRenderingService.RenderTile", __LINE__, __WFILE__, NULL, L"", NULL);
 
@@ -178,7 +207,7 @@
     scale = map->GetFiniteDisplayScaleAt(scaleIndex);
 
     // ensure the tile DPI is set on the map
-    map->SetDisplayDpi(MgTileParameters::tileDPI);
+    map->SetDisplayDpi(tileDpi);
 
     // ------------------------------------------------------
     // the upper left corner of tile (0,0) corresponds to the
@@ -194,9 +223,9 @@
     double mapMaxY = rs_max(pt00->GetY(), pt11->GetY());
 
     double metersPerUnit  = map->GetMetersPerUnit();
-    double metersPerPixel = METERS_PER_INCH / MgTileParameters::tileDPI;
-    double tileWidthMCS   = (double)MgTileParameters::tileWidth  * metersPerPixel * scale / metersPerUnit;
-    double tileHeightMCS  = (double)MgTileParameters::tileHeight * metersPerPixel * scale / metersPerUnit;
+    double metersPerPixel = METERS_PER_INCH / tileDpi;
+    double tileWidthMCS   = (double)tileWidth  * metersPerPixel * scale / metersPerUnit;
+    double tileHeightMCS  = (double)tileHeight * metersPerPixel * scale / metersPerUnit;
 
     double tileMinX = mapMinX + (double)(tileColumn  ) * tileWidthMCS;  // left edge
     double tileMaxX = mapMinX + (double)(tileColumn+1) * tileWidthMCS;  // right edge
@@ -204,15 +233,153 @@
     double tileMaxY = mapMaxY - (double)(tileRow     ) * tileHeightMCS; // top edge
 
     // make the call to render the tile
-    ret = RenderTile(map, baseGroup, scaleIndex, MgTileParameters::tileWidth, MgTileParameters::tileHeight, scale,
-                     tileMinX, tileMaxX, tileMinY, tileMaxY, MgTileParameters::tileFormat);
+    ret = RenderTile(map, baseGroup, scaleIndex, tileWidth, tileHeight, scale,
+                     tileMinX, tileMaxX, tileMinY, tileMaxY, tileImageFormat);
 
     MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderTile")
 
     return ret.Detach();
 }
 
+MgByteReader* MgServerRenderingService::RenderTileXYZ(MgMap* map,
+                                                      CREFSTRING baseMapLayerGroupName,
+                                                      INT32 x,
+                                                      INT32 y,
+                                                      INT32 z)
+{
+    Ptr<MgByteReader> ret;
 
+    MG_TRY()
+
+    ret = RenderTileXYZ(map, baseMapLayerGroupName, x, y, z, MgTileParameters::tileDPI, MgTileParameters::tileFormat);
+
+    MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderTileXYZ")
+
+    return ret.Detach();
+}
+
+MgByteReader* MgServerRenderingService::RenderTileXYZ(MgMap* map,
+                                                      CREFSTRING baseMapLayerGroupName,
+                                                      INT32 x,
+                                                      INT32 y,
+                                                      INT32 z,
+                                                      INT32 dpi,
+                                                      CREFSTRING tileImageFormat)
+{
+    Ptr<MgByteReader> ret;
+
+    MG_TRY()
+
+    if (NULL == map || baseMapLayerGroupName.empty())
+        throw new MgNullArgumentException(L"MgServerRenderingService.RenderTileXYZ", __LINE__, __WFILE__, NULL, L"", NULL);
+
+    // get the layer group associated with the name
+    Ptr<MgLayerGroupCollection> layerGroups = map->GetLayerGroups();
+    Ptr<MgLayerGroup> baseGroup = layerGroups->GetItem(baseMapLayerGroupName);
+    if (baseGroup == NULL)
+    {
+        MgStringCollection arguments;
+        arguments.Add(L"2");
+        arguments.Add(baseMapLayerGroupName);
+
+        throw new MgInvalidArgumentException(L"MgServerRenderingService.RenderTileXYZ",
+            __LINE__, __WFILE__, &arguments, L"MgMapLayerGroupNameNotFound", NULL);
+    }
+
+    //Set the dpi
+    map->SetDisplayDpi(dpi);
+
+    //XYZ to lat/lon math. From this we can convert to the bounds in the map's CS
+    //
+    //Source: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
+    double nMin = M_PI - 2.0 * M_PI * y / pow(2.0, z);
+    double nMax = M_PI - 2.0 * M_PI * (y + 1) / pow(2.0, z);
+    double lonMin = x / pow(2.0, z) * 360.0 - 180;
+	double latMin = 180.0 / M_PI * atan(0.5 * (exp(nMin) - exp(-nMin)));
+    double lonMax = (x + 1) / pow(2.0, z) * 360.0 - 180;
+	double latMax = 180.0 / M_PI * atan(0.5 * (exp(nMax) - exp(-nMax)));
+
+    double mcsMinX = std::min(lonMin, lonMax);
+    double mcsMinY = std::min(latMin, latMax);
+    double mcsMaxX = std::max(lonMin, lonMax);
+    double mcsMaxY = std::max(latMin, latMax);
+
+    STRING mapCsWkt = map->GetMapSRS();
+    Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+    Ptr<MgCoordinateSystem> mapCs = csFactory->Create(mapCsWkt);
+    if (mapCs->GetCsCode() != L"LL84")
+    {
+        //Set up LL to map transform and transform the bounds into map space
+        Ptr<MgCoordinateSystem> llCs = csFactory->CreateFromCode(L"LL84");
+        Ptr<MgCoordinateSystemTransform> trans = csFactory->GetTransform(llCs, mapCs);
+
+        Ptr<MgCoordinate> ul = trans->Transform(lonMin, latMin);
+        Ptr<MgCoordinate> lr = trans->Transform(lonMax, latMax);
+
+        mcsMinX = std::min(lr->GetX(), ul->GetX());
+        mcsMinY = std::min(lr->GetY(), ul->GetY());
+        mcsMaxX = std::max(lr->GetX(), ul->GetX());
+        mcsMaxY = std::max(lr->GetY(), ul->GetY());
+    }
+
+    // Inlining same logic from RenderTile() overload below as we want the same logic, but we want to pass scale
+    // instead of scale index
+    double scale = 0.0;
+    double metersPerPixel = 0.0254 / dpi;
+    double mcsW = mcsMaxX - mcsMinX;
+    double mcsH = mcsMaxY - mcsMinY;
+    if (XYZ_TILE_HEIGHT * mcsW > XYZ_TILE_WIDTH * mcsH)
+        scale = mcsW * map->GetMetersPerUnit() / (XYZ_TILE_WIDTH * metersPerPixel); // width-limited
+    else
+        scale = mcsH * map->GetMetersPerUnit() / (XYZ_TILE_HEIGHT * metersPerPixel); // height-limited
+
+    // get map extent that corresponds to tile extent
+    RS_Bounds extent(mcsMinX, mcsMinY, mcsMaxX, mcsMaxY);
+
+    // use the map's background color, but always make it fully transparent
+    RS_Color bgColor;
+    StylizationUtil::ParseColor(map->GetBackgroundColor(), bgColor);
+    bgColor.alpha() = 0;
+
+    // the label renderer needs to know the tile extent offset parameter
+    double tileExtentOffset = 0.0;
+    MgConfiguration* pConf = MgConfiguration::GetInstance();
+    pConf->GetDoubleValue(MgConfigProperties::RenderingServicePropertiesSection,
+                          MgConfigProperties::RenderingServicePropertyTileExtentOffset,
+                          tileExtentOffset,
+                          MgConfigProperties::DefaultRenderingServicePropertyTileExtentOffset);
+    if (tileExtentOffset < 0.0)
+        tileExtentOffset = MgConfigProperties::DefaultRenderingServicePropertyTileExtentOffset;
+
+    // initialize the renderer (set clipping to false so that we label
+    // the unclipped geometry)
+    auto_ptr<SE_Renderer> dr(CreateRenderer(XYZ_TILE_WIDTH, XYZ_TILE_HEIGHT, bgColor, false, true, tileExtentOffset));
+
+    // create a temporary collection containing all the layers for the base group
+    Ptr<MgLayerCollection> layers = map->GetLayers();
+    Ptr<MgReadOnlyLayerCollection> roLayers = new MgReadOnlyLayerCollection();
+    for (int i=0; i<layers->GetCount(); i++)
+    {
+        Ptr<MgLayerBase> layer = layers->GetItem(i);
+        Ptr<MgLayerGroup> parentGroup = layer->GetGroup();
+        if (parentGroup == baseGroup)
+            roLayers->Add(layer);
+    }
+
+    // of course the group has to also be visible
+    bool groupVisible = baseGroup->GetVisible();
+    baseGroup->SetVisible(true);
+
+    // call the internal helper API to do all the stylization overhead work
+    ret = RenderMapInternal(map, NULL, roLayers, dr.get(), XYZ_TILE_WIDTH, XYZ_TILE_HEIGHT, XYZ_TILE_WIDTH, XYZ_TILE_HEIGHT, tileImageFormat, scale, extent, true, true, false);
+
+    // restore the base group's visibility
+
+    MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderTileXYZ")
+
+    return ret.Detach();
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 /// render a map using all layers from the baseGroup
 MgByteReader* MgServerRenderingService::RenderTile(MgMap* map,

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.h
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.h	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.h	2014-05-29 16:06:16 UTC (rev 8174)
@@ -47,6 +47,29 @@
                                      INT32 tileColumn,
                                      INT32 tileRow);
 
+    virtual MgByteReader* RenderTile(MgMap* map,
+                                     CREFSTRING baseMapLayerGroupName,
+                                     INT32 tileColumn,
+                                     INT32 tileRow,
+                                     INT32 tileWidth,
+                                     INT32 tileHeight,
+                                     INT32 tileDpi,
+                                     CREFSTRING tileImageFormat);
+
+    virtual MgByteReader* RenderTileXYZ(MgMap* map,
+                                        CREFSTRING baseMapLayerGroupName,
+                                        INT32 x,
+                                        INT32 y,
+                                        INT32 z);
+
+    virtual MgByteReader* RenderTileXYZ(MgMap* map,
+                                        CREFSTRING baseMapLayerGroupName,
+                                        INT32 x,
+                                        INT32 y,
+                                        INT32 z,
+                                        INT32 dpi,
+                                        CREFSTRING tileImageFormat);
+
     virtual MgByteReader* RenderDynamicOverlay(MgMap* map,
                                                MgSelection* selection,
                                                CREFSTRING format);

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj	2014-05-29 16:06:16 UTC (rev 8174)
@@ -234,6 +234,12 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="OpRenderTileXYZ.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="RenderingOperation.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -285,6 +291,7 @@
     <ClInclude Include="OpRenderMap.h" />
     <ClInclude Include="OpRenderMapLegend.h" />
     <ClInclude Include="OpRenderTile.h" />
+    <ClInclude Include="OpRenderTileXYZ.h" />
     <ClInclude Include="RenderingOperation.h" />
     <ClInclude Include="RenderingOperationFactory.h" />
     <ClInclude Include="FeatureInfoRenderer.h" />

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj.filters
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj.filters	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingService.vcxproj.filters	2014-05-29 16:06:16 UTC (rev 8174)
@@ -36,6 +36,9 @@
     <ClCompile Include="RenderingServiceHandler.cpp" />
     <ClCompile Include="ServerRenderingService.cpp" />
     <ClCompile Include="ServerRenderingServiceBuild.cpp" />
+    <ClCompile Include="OpRenderTileXYZ.cpp">
+      <Filter>Ops</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="OpQueryFeatureProperties.h">
@@ -68,6 +71,9 @@
     <ClInclude Include="ServerRenderingDllExport.h" />
     <ClInclude Include="ServerRenderingService.h" />
     <ClInclude Include="..\..\Common\stdafx.h" />
+    <ClInclude Include="OpRenderTileXYZ.h">
+      <Filter>Ops</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="ServerRenderingService.rc" />

Modified: sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingServiceBuild.cpp
===================================================================
--- sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingServiceBuild.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/Services/Rendering/ServerRenderingServiceBuild.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -24,6 +24,7 @@
 #include "OpRenderMap.cpp"
 #include "OpRenderMapLegend.cpp"
 #include "OpRenderTile.cpp"
+#include "OpRenderTileXYZ.cpp"
 #include "OpQueryFeatures.cpp"
 #include "OpQueryFeatureProperties.cpp"
 #include "RenderingOperation.cpp"

Modified: sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.cpp
===================================================================
--- sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.cpp	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.cpp	2014-05-29 16:06:16 UTC (rev 8174)
@@ -1597,6 +1597,87 @@
     }
 }
 
+void TestRenderingService::TestCase_RenderTileBaseline()
+{
+    try
+    {
+        Ptr<MgMap> map = CreateTestTiledMap();
+        map->SetViewScale(12500.0);
+        Ptr<MgByteReader> tile4_6 = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 6);
+        Ptr<MgByteReader> tile4_7 = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 7);
+        Ptr<MgByteReader> tile5_6 = m_svcRendering->RenderTile(map, L"BaseLayers", 5, 6);
+        Ptr<MgByteReader> tile5_7 = m_svcRendering->RenderTile(map, L"BaseLayers", 5, 7);
+
+        tile4_6->ToFile(L"../UnitTestFiles/RenderTile_4_6_Baseline.png");
+        tile4_7->ToFile(L"../UnitTestFiles/RenderTile_4_7_Baseline.png");
+        tile5_6->ToFile(L"../UnitTestFiles/RenderTile_5_6_Baseline.png");
+        tile5_7->ToFile(L"../UnitTestFiles/RenderTile_5_7_Baseline.png");
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TEST_LOCALE);
+        SAFE_RELEASE(e);
+        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+}
+
+void TestRenderingService::TestCase_RenderTile(CREFSTRING imageFormat, CREFSTRING extension)
+{
+    try
+    {
+        Ptr<MgMap> map = CreateTestTiledMap();
+        map->SetViewScale(12500.0);
+        Ptr<MgByteReader> tile4_6 = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 6, 300, 300, 96, imageFormat);
+        Ptr<MgByteReader> tile4_7 = m_svcRendering->RenderTile(map, L"BaseLayers", 4, 7, 300, 300, 96, imageFormat);
+        Ptr<MgByteReader> tile5_6 = m_svcRendering->RenderTile(map, L"BaseLayers", 5, 6, 300, 300, 96, imageFormat);
+        Ptr<MgByteReader> tile5_7 = m_svcRendering->RenderTile(map, L"BaseLayers", 5, 7, 300, 300, 96, imageFormat);
+
+        tile4_6->ToFile(GetPath(L"../UnitTestFiles/RenderTile_4_6_300x300 at 96", imageFormat, extension));
+        tile4_7->ToFile(GetPath(L"../UnitTestFiles/RenderTile_4_7_300x300 at 96", imageFormat, extension));
+        tile5_6->ToFile(GetPath(L"../UnitTestFiles/RenderTile_5_6_300x300 at 96", imageFormat, extension));
+        tile5_7->ToFile(GetPath(L"../UnitTestFiles/RenderTile_5_7_300x300 at 96", imageFormat, extension));
+
+        Ptr<MgByteReader> tile11_11 = m_svcRendering->RenderTile(map, L"BaseLayers", 11, 11, 256, 256, 96, imageFormat);
+        Ptr<MgByteReader> tile11_12 = m_svcRendering->RenderTile(map, L"BaseLayers", 11, 12, 256, 256, 96, imageFormat);
+        Ptr<MgByteReader> tile12_11 = m_svcRendering->RenderTile(map, L"BaseLayers", 12, 11, 256, 256, 96, imageFormat);
+        Ptr<MgByteReader> tile12_12 = m_svcRendering->RenderTile(map, L"BaseLayers", 12, 12, 256, 256, 96, imageFormat);
+
+        tile11_11->ToFile(GetPath(L"../UnitTestFiles/RenderTile_11_11_256x256 at 96", imageFormat, extension));
+        tile11_12->ToFile(GetPath(L"../UnitTestFiles/RenderTile_11_12_256x256 at 96", imageFormat, extension));
+        tile12_11->ToFile(GetPath(L"../UnitTestFiles/RenderTile_12_11_256x256 at 96", imageFormat, extension));
+        tile12_12->ToFile(GetPath(L"../UnitTestFiles/RenderTile_12_12_256x256 at 96", imageFormat, extension));
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TEST_LOCALE);
+        SAFE_RELEASE(e);
+        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+}
+
+void TestRenderingService::TestCase_RenderTileXYZ(CREFSTRING imageFormat, CREFSTRING extension)
+{
+    try
+    {
+        Ptr<MgMap> map = CreateTestTiledMap();
+        Ptr<MgByteReader> tileTL = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2099, 2985, 13, 96, imageFormat);
+        Ptr<MgByteReader> tileTR = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2100, 2985, 13, 96, imageFormat);
+        Ptr<MgByteReader> tileBL = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2099, 2986, 13, 96, imageFormat);
+        Ptr<MgByteReader> tileBR = m_svcRendering->RenderTileXYZ(map, L"BaseLayers", 2100, 2986, 13, 96, imageFormat);
+
+        tileTL->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_TopLeft", imageFormat, extension));
+        tileTR->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_TopRight", imageFormat, extension));
+        tileBL->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_BottomLeft", imageFormat, extension));
+        tileBR->ToFile(GetPath(L"../UnitTestFiles/RenderTileXYZ_BottomRight", imageFormat, extension));
+    }
+    catch (MgException* e)
+    {
+        STRING message = e->GetDetails(TEST_LOCALE);
+        SAFE_RELEASE(e);
+        CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+    }
+}
+
 STRING TestRenderingService::GetPath(CREFSTRING basePath, CREFSTRING imageFormat, CREFSTRING extension)
 {
 	STRING ret;

Modified: sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.h
===================================================================
--- sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.h	2014-05-28 11:25:15 UTC (rev 8173)
+++ sandbox/jng/tiling/Server/src/UnitTesting/TestRenderingService.h	2014-05-29 16:06:16 UTC (rev 8174)
@@ -25,6 +25,8 @@
     CPPUNIT_TEST_SUITE(TestRenderingService);
     CPPUNIT_TEST(TestStart); // This must be the very first unit test
 
+    CPPUNIT_TEST(TestCase_RenderTileBaseline);
+
     CPPUNIT_TEST(TestCase_StylizationFunctionsPNG);
 
     CPPUNIT_TEST(TestCase_SymbologyPointsPNG);
@@ -50,6 +52,8 @@
     CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG);
     CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG);
     CPPUNIT_TEST(TestCase_LayerWatermarkPNG);
+    CPPUNIT_TEST(TestCase_RenderTilePNG);
+    CPPUNIT_TEST(TestCase_RenderTileXYZ_PNG);
 
     CPPUNIT_TEST(TestCase_StylizationFunctionsPNG8);
 
@@ -76,6 +80,8 @@
     CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSPNG8);
     CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSPNG8);
     CPPUNIT_TEST(TestCase_LayerWatermarkPNG8);
+    CPPUNIT_TEST(TestCase_RenderTilePNG8);
+    CPPUNIT_TEST(TestCase_RenderTileXYZ_PNG8);
 
     CPPUNIT_TEST(TestCase_StylizationFunctionsGIF);
 
@@ -102,6 +108,8 @@
     CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSGIF);
     CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSGIF);
     CPPUNIT_TEST(TestCase_LayerWatermarkGIF);
+    CPPUNIT_TEST(TestCase_RenderTileGIF);
+    CPPUNIT_TEST(TestCase_RenderTileXYZ_GIF);
 
     CPPUNIT_TEST(TestCase_StylizationFunctionsJPG);
 
@@ -128,6 +136,8 @@
     CPPUNIT_TEST(TestCase_RenderLegendMultiFTSSingleCTSJPG);
     CPPUNIT_TEST(TestCase_RenderLegendSingleFTSMultiCTSJPG);
     CPPUNIT_TEST(TestCase_LayerWatermarkJPG);
+    CPPUNIT_TEST(TestCase_RenderTileJPG);
+    CPPUNIT_TEST(TestCase_RenderTileXYZ_JPG);
 
     CPPUNIT_TEST(TestCase_QueryFeatures);
 
@@ -146,6 +156,9 @@
     void TestEnd();
 
     void TestCase_QueryFeatures();
+    void TestCase_RenderTileBaseline();
+    void TestCase_RenderTile(CREFSTRING imageFormat, CREFSTRING extension);
+    void TestCase_RenderTileXYZ(CREFSTRING imageFormat, CREFSTRING extension);
 
     //Parameterized versions that all format-specific tests call into
     void TestCase_RenderDynamicOverlay(CREFSTRING imageFormat, CREFSTRING extension);
@@ -198,6 +211,8 @@
     void TestCase_RenderLegendSingleFTSMultiCTSPNG() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG", L"png"); }
     void TestCase_StylizationFunctionsPNG() { TestCase_StylizationFunctions(L"PNG", L"png"); }
     void TestCase_LayerWatermarkPNG() { TestCase_LayerWatermark(L"PNG", L"png"); }
+    void TestCase_RenderTilePNG() { TestCase_RenderTile(L"PNG", L"png"); }
+    void TestCase_RenderTileXYZ_PNG() { TestCase_RenderTileXYZ(L"PNG", L"png"); }
 
     //PNG8 output tests
     void TestCase_RenderDynamicOverlayPNG8() { TestCase_RenderDynamicOverlay(L"PNG8", L"png"); }
@@ -222,6 +237,8 @@
     void TestCase_RenderLegendSingleFTSMultiCTSPNG8() { TestCase_RenderLegendSingleFTSMultiCTS(L"PNG8", L"png"); }
     void TestCase_StylizationFunctionsPNG8() { TestCase_StylizationFunctions(L"PNG8", L"png"); }
     void TestCase_LayerWatermarkPNG8() { TestCase_LayerWatermark(L"PNG8", L"png"); }
+    void TestCase_RenderTilePNG8() { TestCase_RenderTile(L"PNG8", L"png"); }
+    void TestCase_RenderTileXYZ_PNG8() { TestCase_RenderTileXYZ(L"PNG8", L"png"); }
 
     //GIF output tests
     void TestCase_RenderDynamicOverlayGIF() { TestCase_RenderDynamicOverlay(L"GIF", L"gif"); }
@@ -246,6 +263,8 @@
     void TestCase_RenderLegendSingleFTSMultiCTSGIF() { TestCase_RenderLegendSingleFTSMultiCTS(L"GIF", L"gif"); }
     void TestCase_StylizationFunctionsGIF() { TestCase_StylizationFunctions(L"GIF", L"gif"); }
     void TestCase_LayerWatermarkGIF() { TestCase_LayerWatermark(L"GIF", L"gif"); }
+    void TestCase_RenderTileGIF() { TestCase_RenderTile(L"GIF", L"gif"); }
+    void TestCase_RenderTileXYZ_GIF() { TestCase_RenderTileXYZ(L"GIF", L"gif"); }
 
     //JPG output tests
     void TestCase_RenderDynamicOverlayJPG() { TestCase_RenderDynamicOverlay(L"JPG", L"jpg"); }
@@ -270,6 +289,8 @@
     void TestCase_RenderLegendSingleFTSMultiCTSJPG() { TestCase_RenderLegendSingleFTSMultiCTS(L"JPG", L"jpg"); }
     void TestCase_StylizationFunctionsJPG() { TestCase_StylizationFunctions(L"JPG", L"jpg"); }
     void TestCase_LayerWatermarkJPG() { TestCase_LayerWatermark(L"JPG", L"jpg"); }
+    void TestCase_RenderTileJPG() { TestCase_RenderTile(L"JPG", L"jpg"); }
+    void TestCase_RenderTileXYZ_JPG() { TestCase_RenderTileXYZ(L"JPG", L"jpg"); }
 
     //void TestCase_RendererPerformance();
 



More information about the mapguide-commits mailing list