You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Activity
peterqliu commentedon Dec 4, 2014
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)
tmcw commentedon Jun 18, 2015
@ansis how deep is this issue? Where would a contributor start if they wanted to add labels to the rtree?
ansis commentedon 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.
CollisionTilealready uses an rtree to index label positions for collisions. I think I'd extendCollisionTileto be able to return whichCollisionFeatures are in the query box at a given zoom level. This would involve understanding how labels are represented for collisions and howCollisionTile.placeCollisionFeatureworks.And then a bunch of work to integrate the new
CollisionTile.featuresAtwithFeatureTree.samanpwbb commentedon Jul 7, 2015
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 commentedon Jul 7, 2015
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.return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries
return text and icons in featuresAt queries