diff --git a/src/tile.js b/src/tile.js index b41aa9e9..45f2823b 100644 --- a/src/tile.js +++ b/src/tile.js @@ -129,7 +129,7 @@ $.Tile = function(level, x, y, bounds, exists, url, context2D, loadWithAjax, aja this.ajaxHeaders = ajaxHeaders; if (cacheKey === undefined) { - $.console.error("Tile constructor needs 'cacheKey' variable: creation tile cache" + + $.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache" + " in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."); cacheKey = $.TileSource.prototype.getTileHashKey(level, x, y, url, ajaxHeaders, postData); } diff --git a/src/viewer.js b/src/viewer.js index df553e4c..007f1bf1 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1398,6 +1398,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, options.ajaxHeaders = $.extend({}, this.ajaxHeaders, options.ajaxHeaders); } + if (!$.isFunction(options.tileSource.getTileHashKey)) { + //silently add custom implementation + options.tileSource.getTileHashKey = $.TileSource.prototype.getTileHashKey; + } + var myQueueItem = { options: options };