Skip to content

Commit

Permalink
only queryFeatures for loaded tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed Mar 21, 2019
1 parent 9d335ee commit fbb9e33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scene/scene_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ const SceneWorker = Object.assign(self, {
// Query features within visible tiles, with optional filter conditions
queryFeatures ({ filter, visible, geometry, tile_keys }) {
let features = [];
let tiles = tile_keys.map(t => this.tiles[t]).filter(t => t);
let tiles = tile_keys
.map(t => this.tiles[t])
.filter(t => t && t.loaded);

// Compile feature filter
if (filter != null) {
Expand Down

0 comments on commit fbb9e33

Please sign in to comment.