Skip to content

Commit

Permalink
rename VectorTileSource#setData to setSourceProperty mapbox#3709
Browse files Browse the repository at this point in the history
  • Loading branch information
stepankuzmin committed Jan 12, 2020
1 parent c6c695b commit 5ebb174
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/source/vector_tile_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,15 @@ class VectorTileSource extends Evented implements Source {
this.load();
}

setData(options: VectorSourceSpecification & {collectResourceTiming: boolean}) {
setSourceProperty(name: string, value: mixed) {
if (this._tileJSONRequest) {
this._tileJSONRequest.cancel();
}

const options = { [name]: value};
extend(this, pick(options, ['url', 'scheme', 'tileSize']));
this._options = extend({ type: 'vector' }, options);

this._collectResourceTiming = options.collectResourceTiming;

if (this.tileSize !== 512) {
throw new Error('vector tile sources must have a tileSize of 512');
}
Expand Down

0 comments on commit 5ebb174

Please sign in to comment.