mapbox / mapbox/mapbox-gl-js

Collision boxes don't account for symbol-placement:point/rotation-alignment: map

Open
#4,861 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

As far as I can tell this has always been the case:

screenshot 2017-06-21 13 30 56

Labels with `rotation-alignment: map` are usually more likely to use `symbol-placement: line`, and they're mostly fine because collision detection is done with a series of small boxes (icons with lopsided aspect ratios might be an exception here).

This would be straightforward to fix if we moved to an approach of global collision detection using current camera parameters (discussed somewhat in https://github.com/mapbox/mapbox-gl-js/issues/4704).

/cc @ansis

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked discussion in issue #4704 and the collision-detection behavior described here for map-aligned symbols. Determine how collision boxes should account for current camera parameters and verify the result against the reported map rotation case; done means the boxes correctly reflect symbol rotation during collision detection.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.