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

Master ticket: Variable label placement enhancements #8599

Open
chloekraw opened this issue Aug 5, 2019 · 2 comments
Open

Master ticket: Variable label placement enhancements #8599

chloekraw opened this issue Aug 5, 2019 · 2 comments
Assignees
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏

Comments

@chloekraw
Copy link
Contributor

chloekraw commented Aug 5, 2019

Earlier this year, we released a feature called variable label placement which enables map designers to try multiple (up to 9) placement options for labels around their anchor. This was added in #7596.

To enable variable label placement, set text-variable-anchor, text-radial-offset and text-justify on a symbol layer. For an excellent write-up of this feature and its benefits, see @nickidlugash's ticket #5038.

Since the initial launch of this feature, we've collected valuable insight into how we can improve these properties and their interaction with other style specification properties. We're doing a push to get some of these improvements landed in the next release, queso.

I'm cutting a ticket to help us stay organized and to collect future tickets that are open about this feature.

Enhancement Ticket Owner Timeline Status
Anchor positions should be cleared by setStyle #8397 @asheemmamoowala release-picklejuice ✅ closed by #8473 and mapbox/mapbox-gl-native#15129
Account for icon size/bounding boxes #8598; mapbox/mapbox-gl-native#15365 @pozdnyakov release-ristretto ✅ closed by #8642 and mapbox/mapbox-gl-native#15542
Account for character descenders #8560; mapbox/mapbox-gl-native#15366 @pozdnyakov / @alexshalamov none Depends on #191
Use with icon-text-fit #8583; mapbox/mapbox-gl-native#15346 @alexshalamov / @ansis release-queso ✅ closed by mapbox/mapbox-gl-native#15367; JS PR forthcoming
Use with icon-/text-allow-overlap #8527; mapbox/mapbox-gl-native#15357 @pozdnyakov / @ansis release-queso ✅ closed by #8620 and mapbox/mapbox-gl-native#15354
Deduplicate anchor positions #8445 release-ristretto (lower priority) needs assignment
Reduce jumpiness #8219 none

Feel free to update this table directly as work moves or assignments change.

cc @mapbox/gl-js @mapbox/gl-native @mapbox/map-design-team @mapbox/maps-android @mapbox/maps-ios @philogb

@asheemmamoowala
Copy link
Contributor

After talking this over with @ansis last week, I'm moving 'Deduplicate anchor positions' from release-queso to release-r. It is a minor performance enhancement and should be done in both JS and Native.

cc @chloekraw

@mourner mourner added feature 🍏 cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) labels Aug 14, 2019
@xabbu42
Copy link

xabbu42 commented Aug 19, 2019

I have a situation where variable label placement for lines would be useful. That is I have a data file with line features for bicycle ways in Switzerland organized by the route number. Many of them partially overlap as often the same road is part of multiple national routes. If I do not preprocess the data at all and want to add symbols on the map using a symbol layer, sometime one line feature blocks out labels for the other completely. What I would want is for the symbols for the second line feature to be moved a bit along the line so they are drawn beside the symbols of the first line feature as the exact positions along the line are not important (but the symbol-spacing for each individual feature is).

Something like symbol-variable-spacing which allows the icons to be a bit closer or further away so they can still be drawn would be very useful in that case.

I have no idea how hard this is to implement and if this issue actually has anything todo with this. I can open a new feature request issue if anybody is interested. Unfortunately I'm in no position to implement it myself.

@asheemmamoowala asheemmamoowala self-assigned this Aug 22, 2019
@asheemmamoowala asheemmamoowala removed this from the release-ristretto milestone Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏
Projects
None yet
Development

No branches or pull requests

4 participants