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

return visibility in featuresAt() #582

Closed
edenh opened this issue Jul 21, 2014 · 6 comments
Closed

return visibility in featuresAt() #582

edenh opened this issue Jul 21, 2014 · 6 comments

Comments

@edenh
Copy link
Contributor

edenh commented Jul 21, 2014

map.featuresAt() currently returns all layers for that point, even if they are not visible because of collisions. We should either not return hidden layers for those points or return with a visible: false key.

@ansis @jfirebaugh @mourner

@mourner mourner modified the milestones: v0.1.0, future Jul 24, 2014
@jfirebaugh jfirebaugh removed this from the future milestone Jun 15, 2015
@jfirebaugh
Copy link
Contributor

Agreed. I think the default should be to omit hidden features, with an option to include them. Having the visibility available as a property on the resulting features is also a good idea.

@mcwhittemore
Copy link
Contributor

Hidden features might be a thing people are using currently (intentionally or not) so providing the hidden attribute is the safest bet.

@steinbachr
Copy link

+1

@peterqliu
Copy link
Contributor

+1 to a configurable option. having a featuresAt that matches visibility is useful when building interactivity with map elements. but when you're using the map as an interface to access the underlying dataset, retrieving the full data is useful

@musicformellons
Copy link

+1

@ansis
Copy link
Contributor

ansis commented Mar 24, 2016

featuresAt is replaced by queryRenderedFeatures and querySourceFeatures. queryRenderedFeatures only returns visible features. Symbols hidden because of collisions are not returned. querySourceFeatures can be used to get features independent of styling. I don't think we need an option for including hidden features right now.

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

No branches or pull requests

8 participants