Skip to content

Commit

Permalink
handle tiles with no data in scene.queryFeatures()
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed Jun 11, 2019
1 parent 0406d9d commit 7946554
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scene/scene_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ const SceneWorker = Object.assign(self, {
tiles.forEach(tile => {
for (let layer in tile.source_data.layers) {
let data = tile.source_data.layers[layer];

if (data == null) {
return;
}

data.features.forEach(feature => {
// Optionally check if feature is visible (e.g. was rendered for current generation)
const feature_visible = (feature.generation === this.generation);
Expand Down

0 comments on commit 7946554

Please sign in to comment.