Skip to content

Commit

Permalink
fix(provider): wrong tag to cache data.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Nov 5, 2019
1 parent 540f3dd commit 4b1adf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Provider/DataSourceProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export default {
const extSource = extentsSource[i];

// Tag to Cache data
const tag = `${source.uid}-${extSource.toString('-')}`;
const exTag = source.isVectorSource ? extentsDestination[i] : extSource;
const tag = `${source.uid}-${exTag.toString('-')}`;

// Get converted source data, in cache
let convertedSourceData = Cache.get(tag);
Expand Down
1 change: 1 addition & 0 deletions src/Source/Source.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class Source {
this.format = source.format;
this.fetcher = source.fetcher || supportedFetchers.get(source.format) || Fetcher.texture;
this.parser = source.parser || supportedParsers.get(source.format) || (d => Promise.resolve(d));
this.isVectorSource = (source.parser || supportedParsers.get(source.format)) != undefined;
this.networkOptions = source.networkOptions || { crossOrigin: 'anonymous' };
this.projection = source.projection;
this.attribution = source.attribution;
Expand Down

0 comments on commit 4b1adf2

Please sign in to comment.