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

interaction for labels #303

Closed
ansis opened this issue Feb 20, 2014 · 5 comments · Fixed by #2052
Closed

interaction for labels #303

ansis opened this issue Feb 20, 2014 · 5 comments · Fixed by #2052
Assignees

Comments

@ansis
Copy link
Contributor

ansis commented Feb 20, 2014

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

@mourner mourner added this to the future milestone Jun 24, 2014
@peterqliu
Copy link
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)

@jfirebaugh jfirebaugh removed this from the future milestone Jun 15, 2015
@tmcw
Copy link
Contributor

tmcw commented Jun 18, 2015

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

@ansis
Copy link
Contributor Author

ansis commented Jun 18, 2015

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.

@samanpwbb
Copy link
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.

@peterqliu
Copy link
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.

ansis added a commit that referenced this issue Feb 4, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
@ansis ansis self-assigned this Feb 4, 2016
ansis added a commit that referenced this issue Feb 9, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Feb 13, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Feb 23, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Mar 9, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Mar 16, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Mar 17, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Mar 21, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
ansis added a commit that referenced this issue Mar 24, 2016
fix #303

This increases worker memory usage by around 10% (a couple of MB).
1/3 of the increase comes from retaining the CollisionTile.
2/3 of the increase comes from retaining VectorTileFeatures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants