Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

featuresIn doesn't return features from non-visible layers #1785

Closed
drewbo opened this issue Dec 2, 2015 · 4 comments
Closed

featuresIn doesn't return features from non-visible layers #1785

drewbo opened this issue Dec 2, 2015 · 4 comments

Comments

@drewbo
Copy link
Contributor

drewbo commented Dec 2, 2015

Related to #582

Here's a working demo which filters out Landsat scenes based on a selected region: https://gist.github.com/drewbo/9700ea2eb3ca9e9b83fb

It fails (stops returning features in the featuresIn callback) if fill-opacity is set to 0 or if layout.visibility === none

@timjcook
Copy link

timjcook commented Feb 5, 2016

+1. My use case is that I am revealing a layer that was previously hidden and want it's features in the viewport at that moment, however if I call featuresIn() immediately after revealing the layer and there is a delay in the map rendering the features, I get no features back.

@CodeCommander
Copy link

I want to use this to "flyTo" the coordinates of a feature that is filtered to be hidden. Is there no way to get a reference to a hidden feature?

@lucaswoj
Copy link
Contributor

lucaswoj commented Mar 1, 2016

@CodeCommander Not yet but it'll be added in #2052

@jfirebaugh
Copy link
Contributor

Non-visible features are now queryable via querySourceFeatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants