Skip to content

Commit

Permalink
fix(VectorTileSource): error if vector tile layer style is undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Nov 26, 2021
1 parent 7051c54 commit b535583
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Source/VectorTilesSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ class VectorTilesSource extends TMSSource {

onLayerAdded(options) {
super.onLayerAdded(options);
const keys = Object.keys(this.styles);
if (options.out.style) {
const keys = Object.keys(this.styles);

keys.forEach((k) => { this.styles[k].parent = options.out.style; });
keys.forEach((k) => { this.styles[k].parent = options.out.style; });
}
}
}

Expand Down

0 comments on commit b535583

Please sign in to comment.