diff --git a/code/map_data_debug.js b/code/map_data_debug.js index 44783794..b0482daa 100644 --- a/code/map_data_debug.js +++ b/code/map_data_debug.js @@ -49,3 +49,14 @@ window.RenderDebugTiles.prototype.setState = function(id,state) { } this.setColour (id, col, fill); } + + +window.RenderDebugTiles.prototype.removeOkTiles = function() { + var _this = this; + $.each(this.debugTileToRectangle, function(id,layer) { + if (layer.options.color == '#0f0' && layer.options.color == '#0f0') { + _this.debugTileLayer.removeLayer(layer); + delete _this.debugTileToRectangle[id]; + } + }); +} diff --git a/code/map_data_request.js b/code/map_data_request.js index e2f5008c..9b21d615 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -323,6 +323,7 @@ window.MapDataRequest.prototype.processRequestQueue = function(isFirstPass) { if (Object.keys(this.queuedTiles).length == 0) { this.render.endRenderPass(); + this.debugTiles.removeOkTiles(); var endTime = new Date().getTime(); var duration = (endTime - this.refreshStartTime)/1000;