fixes for optional key handling

This commit is contained in:
Dmitry Fedorov
2018-09-14 12:02:37 -07:00
parent fe0ac80ba4
commit 028caa4664
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -83,7 +83,8 @@ class TileImage extends UrlTile {
url: options.url, url: options.url,
urls: options.urls, urls: options.urls,
wrapX: options.wrapX, wrapX: options.wrapX,
transition: options.transition transition: options.transition,
opt_key: options.opt_key,
}); });
/** /**
+2 -1
View File
@@ -64,6 +64,7 @@ class UrlTile extends TileSource {
*/ */
this.tileUrlFunction = this.fixedTileUrlFunction ? this.tileUrlFunction = this.fixedTileUrlFunction ?
this.fixedTileUrlFunction.bind(this) : nullTileUrlFunction; this.fixedTileUrlFunction.bind(this) : nullTileUrlFunction;
this.key_ = options.opt_key || this.key_;
/** /**
* @protected * @protected
@@ -77,7 +78,7 @@ class UrlTile extends TileSource {
this.setUrl(options.url); this.setUrl(options.url);
} }
if (options.tileUrlFunction) { if (options.tileUrlFunction) {
this.setTileUrlFunction(options.tileUrlFunction); this.setTileUrlFunction(options.tileUrlFunction, options.opt_key);
} }
/** /**