Skip to content

Commit

Permalink
add an extra check for paint member of style layer (#9437)
Browse files Browse the repository at this point in the history
* add an extra check for paint member of style layer

* review comments

Co-Authored-By: Vladimir Agafonkin <[email protected]>

Co-authored-by: Vladimir Agafonkin <[email protected]>
  • Loading branch information
mannnick24 and mourner authored Mar 27, 2020
1 parent e3e348a commit 86eae55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/source/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,9 @@ class Tile {
if (!sourceLayer || !sourceLayerStates || Object.keys(sourceLayerStates).length === 0) continue;

bucket.update(sourceLayerStates, sourceLayer, this.imageAtlas && this.imageAtlas.patternPositions || {});
if (painter && painter.style) {
this.queryPadding = Math.max(this.queryPadding, painter.style.getLayer(id).queryRadius(bucket));
const layer = painter.style.getLayer(id);
if (painter && painter.style && layer.paint) {
this.queryPadding = Math.max(this.queryPadding, layer.queryRadius(bucket));
}
}
}
Expand Down

0 comments on commit 86eae55

Please sign in to comment.