Render errorTile only when showLimitErrors is true
This commit is contained in:
parent
73d1b1a9b5
commit
b597fba4ae
@ -79,6 +79,8 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
|
||||
if (this.options.tileJSON) this.options.provider = 'tileJSON';
|
||||
|
||||
this.showLimitErrors = options.showLimitErrors;
|
||||
|
||||
this.provider = new this.providers[this.options.provider](options);
|
||||
options.layer = this;
|
||||
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
||||
|
@ -297,8 +297,10 @@ var CartoDatasource = require('./datasource');
|
||||
},
|
||||
|
||||
_renderErrorTile: function(tile) {
|
||||
var img = this._icons[ERROR_IMG_URL];
|
||||
img && this._ctx.drawImage(img, 0, 0, this.TILE_SIZE, this.TILE_SIZE);
|
||||
if(this.layer.showLimitErrors) {
|
||||
var img = this._icons[ERROR_IMG_URL];
|
||||
img && this._ctx.drawImage(img, 0, 0, this.TILE_SIZE, this.TILE_SIZE);
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user