[mapguide-commits] r8405 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Tile

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Oct 15 08:27:41 PDT 2014


Author: jng
Date: 2014-10-15 08:27:41 -0700 (Wed, 15 Oct 2014)
New Revision: 8405

Modified:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Tile/BatchSettings.cs
Log:
#2477: Fix incorrect MgCooker tile calculations. Patch by gvtomm.

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Tile/BatchSettings.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Tile/BatchSettings.cs	2014-10-15 14:20:47 UTC (rev 8404)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Tile/BatchSettings.cs	2014-10-15 15:27:41 UTC (rev 8405)
@@ -526,8 +526,10 @@
                     int rowMinTileOffset = (int)Math.Floor(offsetMinY / tileHeight);
                     int colMaxTileOffset = (int)Math.Floor(offsetMaxX / tileWidth);
 
-                    cols += (colMaxTileOffset - colTileOffset);
-                    rows += (rowMinTileOffset - rowTileOffset);
+                    //GT 03/08/2014 - the right number of columns/rows it's the the end tile (maxtileoffset, ex 12) - the start tile (coltileoffset, ex 11) +1
+                    //i.e. 12-11+1=2 so 2 columns
+                    cols = (colMaxTileOffset - colTileOffset) + 1;
+                    rows = (rowMinTileOffset - rowTileOffset) + 1; 
                 }
 
 



More information about the mapguide-commits mailing list