Skip to content

return visibility in featuresAt() #582

Closed

Description

@edenh

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

Activity

  1. modified the milestones: , on Jul 24, 2014
  2. removed this from the milestone on Jun 15, 2015
  3. jfirebaugh commented on Dec 2, 2015

    @jfirebaugh
    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.

  4. mcwhittemore commented on Dec 2, 2015

    @mcwhittemore
    Contributor

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

  5. steinbachr commented on Jan 15, 2016

    @steinbachr

    +1

  6. peterqliu commented on Feb 9, 2016

    @peterqliu
    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

  7. musicformellons commented on Feb 10, 2016

    @musicformellons

    +1

  8. ansis commented on Mar 24, 2016

    @ansis
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions