Skip to content

interaction for labels #303

Closed
Closed

Description

@ansis

map.featuresAt should include labels. or have a separate call for it.

Activity

  1. added this to the milestone on Jun 24, 2014
  2. peterqliu commented on Dec 4, 2014

    @peterqliu
    Contributor

    Would really like this. It solves two problems with featuresAt(): picking up labels that aren't really there (https://github.com/mapbox/mapbox-gl-online/issues/675), and not being able to grab labels that ARE there (https://github.com/mapbox/mapbox-gl-online/issues/374)

  3. removed this from the milestone on Jun 15, 2015
  4. tmcw commented on Jun 18, 2015

    @tmcw
    Contributor

    @ansis how deep is this issue? Where would a contributor start if they wanted to add labels to the rtree?

  5. ansis commented on Jun 18, 2015

    @ansis
    ContributorAuthor

    I think it might be sort of deep. The tricky thing is that labels have different sizes and different lengths along a line at different zoom levels.

    CollisionTile already uses an rtree to index label positions for collisions. I think I'd extend CollisionTile to be able to return which CollisionFeatures are in the query box at a given zoom level. This would involve understanding how labels are represented for collisions and how CollisionTile.placeCollisionFeature works.

    And then a bunch of work to integrate the new CollisionTile.featuresAt with FeatureTree.

  6. samanpwbb commented on Jul 7, 2015

    @samanpwbb
    Contributor

    Any chance this could move some time in the next couple months? Are there any ways to temporarily hack around the issue? It's a pretty big usability knock for direct selecting -> styling. Users always expect to be able to click on labels.

  7. peterqliu commented on Jul 7, 2015

    @peterqliu
    Contributor

    Are there any ways to temporarily hack around the issue? It's a pretty big usability knock for direct selecting -> styling. Users always expect to be able to click on labels.

    for /app, one hack is to call .featuresAt()a second time with a more generous radius, and filter for symbols only. Would probably be too slow for x-ray mode (since it's at risk for being laggy already), but okay for one-shot direct select.

  8. added a commit that references this issue on Feb 4, 2016
    a1ce0cb
  9. self-assigned this
    on Feb 4, 2016
  10. added 2 commits that reference this issue on Feb 9, 2016
    3a0b874
    7b8da05
  11. added a commit that references this issue on Feb 23, 2016
    49d7c29
  12. added a commit that references this issue on Mar 9, 2016
    5498cb1
  13. added 4 commits that reference this issue on Mar 16, 2016
    b5efaa3
    726c093
    ff3b2f9
    fe07654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions