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

View File

@@ -83,7 +83,8 @@ class TileImage extends UrlTile {
url: options.url,
urls: options.urls,
wrapX: options.wrapX,
transition: options.transition
transition: options.transition,
opt_key: options.opt_key,
});
/**

View File

@@ -64,6 +64,7 @@ class UrlTile extends TileSource {
*/
this.tileUrlFunction = this.fixedTileUrlFunction ?
this.fixedTileUrlFunction.bind(this) : nullTileUrlFunction;
this.key_ = options.opt_key || this.key_;
/**
* @protected
@@ -77,7 +78,7 @@ class UrlTile extends TileSource {
this.setUrl(options.url);
}
if (options.tileUrlFunction) {
this.setTileUrlFunction(options.tileUrlFunction);
this.setTileUrlFunction(options.tileUrlFunction, options.opt_key);
}
/**