[mapguide-commits] r9619 - sandbox/jng/mvt_alt/Server/src/Services/Tile

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Sep 23 14:14:27 PDT 2019


Author: jng
Date: 2019-09-23 14:14:27 -0700 (Mon, 23 Sep 2019)
New Revision: 9619

Modified:
   sandbox/jng/mvt_alt/Server/src/Services/Tile/ServerTileService.cpp
   sandbox/jng/mvt_alt/Server/src/Services/Tile/TileCacheXYZProvider.cpp
Log:
Add MVT tile format support to the tile service

Modified: sandbox/jng/mvt_alt/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- sandbox/jng/mvt_alt/Server/src/Services/Tile/ServerTileService.cpp	2019-09-23 21:09:00 UTC (rev 9618)
+++ sandbox/jng/mvt_alt/Server/src/Services/Tile/ServerTileService.cpp	2019-09-23 21:14:27 UTC (rev 9619)
@@ -410,6 +410,7 @@
         xml.append("<Value>JPG</Value>");
         xml.append("<Value>GIF</Value>");
         xml.append("<Value>UTFGRID</Value>");
+        xml.append("<Value>MVT</Value>");
         xml.append("</ConnectionProperty>\n");
 
         //Property: RetinaScale

Modified: sandbox/jng/mvt_alt/Server/src/Services/Tile/TileCacheXYZProvider.cpp
===================================================================
--- sandbox/jng/mvt_alt/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-09-23 21:09:00 UTC (rev 9618)
+++ sandbox/jng/mvt_alt/Server/src/Services/Tile/TileCacheXYZProvider.cpp	2019-09-23 21:14:27 UTC (rev 9619)
@@ -46,7 +46,7 @@
 
 bool MgTileCacheXYZProvider::IsTileImageFormat()
 {
-    return m_format == L"UTFGRID";
+    return m_format != L"UTFGRID" && m_format != L"MVT";
 }
 
 MgByteReader* MgTileCacheXYZProvider::GetTile(CREFSTRING baseMapLayerGroupName,
@@ -83,9 +83,14 @@
     if (svcRendering != NULL)
     {
         // Test for non-image formats first
-        if (m_format == L"UTFGRID")
+        if (m_format == L"MVT")
         {
             // generate the tile
+            img = svcRendering->RenderTileMVT(map, baseMapLayerGroupName, tileRow, tileColumn, scaleIndex, map->GetDisplayDpi());
+        }
+        else if (m_format == L"UTFGRID")
+        {
+            // generate the tile
             img = svcRendering->RenderTileUTFGrid(map, baseMapLayerGroupName, tileRow, tileColumn, scaleIndex, map->GetDisplayDpi());
         }
         else //Assume it must be image-based at this point



More information about the mapguide-commits mailing list