[mapguide-commits] r9503 - sandbox/jng/tiling_v2/Server/src/Services/Tile

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 8 05:28:43 PDT 2019


Author: jng
Date: 2019-05-08 05:28:43 -0700 (Wed, 08 May 2019)
New Revision: 9503

Modified:
   sandbox/jng/tiling_v2/Server/src/Services/Tile/TileCacheXYZProvider.cpp
Log:
Fix XYZ metatile sub-tile storage (need to flip x/y)

Modified: sandbox/jng/tiling_v2/Server/src/Services/Tile/TileCacheXYZProvider.cpp
===================================================================
--- sandbox/jng/tiling_v2/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-05-08 12:07:18 UTC (rev 9502)
+++ sandbox/jng/tiling_v2/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-05-08 12:28:43 UTC (rev 9503)
@@ -427,7 +427,7 @@
         {
             for (int x = 0; x < maxX; x++)    // columns
             {
-                // Collect the subtile from the metatile
+                // Collect the subtile from the metatile (we flip x/y for XYZ)
                 Ptr<MgByteReader> img = MgImageProcessor::RenderTileFromMetaTile(map, metaTile, m_rendererName, svcRendering, x, y);
 #ifdef _DEBUG
                 INT32 tileLen = img->GetLength();
@@ -443,7 +443,8 @@
                 text << L") metaTile(" << metaTileRow << L"," << metaTileColumn << L") " << metaTilePathname.c_str() << L"\n";
                 ACE_DEBUG((LM_DEBUG, text.str().c_str()));
 #endif
-                Set(img, subTilePathname[x][y]);   // store all subtiles in tile cache
+                STRING tilePath = subTilePathname[y][x];
+                Set(img, tilePath);   // store all subtiles in tile cache
 
                 // rewind the reader since setting the tile advances it to the end
                 if (img)
@@ -455,7 +456,7 @@
                     std::wstringstream text;
                     text << L"(" << ACE_OS::thr_self() << L") METATILE: " << (img ? L"SetTile" : L"NoTileReturned");
                     text << "FromMetaTile(" << tileRow << L", " << tileColumn << L") ";
-                    text << subTilePathname[x][y] << L" S(" << x << L", " << y << L")\n";
+                    text << tilePath << L" S(" << x << L", " << y << L")\n";
                     ACE_DEBUG((LM_DEBUG, text.str().c_str()));
                 }
 #endif



More information about the mapguide-commits mailing list