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

Add guidance labelling mode #2518

Closed
2 tasks
yhahn opened this issue Apr 29, 2016 · 2 comments
Closed
2 tasks

Add guidance labelling mode #2518

yhahn opened this issue Apr 29, 2016 · 2 comments
Assignees

Comments

@yhahn
Copy link
Member

yhahn commented Apr 29, 2016

Capturing where I'm at with the experiments with guidance labelling.

What it does

  • 2 new layout properties:
    • text-unique: true: uses label text to dedupe down to only a single label for a given string within a tile
    • symbol-mode: guidance: switches label placement mode to use the "guidance" approach
  • Guidance approach:
    • Places labels close to the viewport center
    • Filtering labels for lines by an angle threshold (e.g. emphasizing cross streets)
    • Defined placement events at major changes to camera angle and aggressive label lockdown in-between to reduce popping/flickering

What I feel confident in at this point

  • Guidance labelling is sufficiently different from basemap map labelling to have have a separate label placement mode.
  • The approach in this branch is usable and a significant improvement over basemap labelling when designing guidance maps.
  • It doesn't make sense to expose customizability to this in the style spec or our renderers beyond an on/off switch. I think we'll want to at least land cross-tile label placement before reconsidering this but for now exposing minimal API surface area on the feature makes most sense.

At the moment I've not given much attention to cleanliness of implementation. My next goals will be to clean up the code and add tests.

Most of the testing at this point has been through using http://github.com/mapbox/guidance-sim and using 👀 which isn't going to be a sustainable approach to prevent regression going forward. I'll focus on setting up unit tests that can stress test the guidance approach, especially the strategies that prevent label flickering/popping.

Next actions

  • @yhahn code cleanup, tests
  • once ready, @ansis or @lucaswoj 👀 for other approaches to cleanup/refactor
@yhahn yhahn self-assigned this Apr 29, 2016
@lucaswoj lucaswoj changed the title Guidance labelling mode Add guidance labelling mode Jul 29, 2016
@lucaswoj
Copy link
Contributor

@yhahn are you still planning to implement this feature in GL JS?

@yhahn
Copy link
Member Author

yhahn commented Jul 31, 2016

Closing out -- achieved the usecase goals with #2668

@yhahn yhahn closed this as completed Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants