Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

do not draw more tiles than necessary

  • Loading branch information...
commit 8b9b22ddd7db2adb3e09a4361ead69a19710dcfb 1 parent 06fb407
camillol authored October 23, 2011
BIN  modestmaps/library/modestmaps.jar
Binary file not shown
4  src/com/modestmaps/InteractiveMap.java
@@ -120,9 +120,9 @@ public void draw() {
120 120
 
121 121
 	    // find start and end columns
122 122
 	    int minCol = (int)p.floor(cols * (screenMinX-minX) / (maxX-minX));
123  
-	    int maxCol = (int)p.ceil(cols * (screenMaxX-minX) / (maxX-minX));
  123
+	    int maxCol = (int)p.ceil(cols * (screenMaxX-minX) / (maxX-minX)) - 1;
124 124
 	    int minRow = (int)p.floor(rows * (screenMinY-minY) / (maxY-minY));
125  
-	    int maxRow = (int)p.ceil(rows * (screenMaxY-minY) / (maxY-minY));
  125
+	    int maxRow = (int)p.ceil(rows * (screenMaxY-minY) / (maxY-minY)) - 1;
126 126
 
127 127
 	    // pad a bit, for luck (well, because we might be zooming out between zoom levels)
128 128
 	    minCol -= GRID_PADDING;

0 notes on commit 8b9b22d

Please sign in to comment.
Something went wrong with that request. Please try again.