From 6cbbba9f8c44d154788cf5c4f6f5fb3b7d3e8970 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 16 Oct 2012 18:17:51 -0400 Subject: [PATCH] Fix white seams betweent tiles by making coordinates absolute --- js/iD/renderer/Map.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/iD/renderer/Map.js b/js/iD/renderer/Map.js index 344ff553f..5933157fd 100755 --- a/js/iD/renderer/Map.js +++ b/js/iD/renderer/Map.js @@ -330,8 +330,8 @@ declare("iD.renderer.Map", null, { _fetchTile:function(z,x,y) { // summary: Load a tile image at the given tile co-ordinates. var t=this.tilegroup.createImage({ - x: this.lon2coord(this.tile2lon(x)), - y: this.lat2coord(this.tile2lat(y)), + x: Math.floor(this.lon2coord(this.tile2lon(x))), + y: Math.floor(this.lat2coord(this.tile2lat(y))), width: 256, height: 256, src: this._tileURL(z,x,y) }); @@ -340,15 +340,15 @@ declare("iD.renderer.Map", null, { _getTile:function(z,x,y) { // summary: See if this tile is already loaded. - if (this.tiles[z]==undefined) { return undefined; } - if (this.tiles[z][x]==undefined) { return undefined; } + if (this.tiles[z]===undefined) { return undefined; } + if (this.tiles[z][x]===undefined) { return undefined; } return this.tiles[z][x][y]; }, _assignTile:function(z,x,y,t) { // summary: Store a reference to the tile so we know it's loaded. - if (this.tiles[z]==undefined) { this.tiles[z]=[]; } - if (this.tiles[z][x]==undefined) { this.tiles[z][x]=[]; } + if (this.tiles[z]===undefined) { this.tiles[z]=[]; } + if (this.tiles[z][x]===undefined) { this.tiles[z][x]=[]; } this.tiles[z][x][y]=t; },