-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
text-radial-offset does not account for icon size or bounding boxes #8598
Comments
@chloekraw thanks for filing the issue! In order to solve it, we could introduce two component Text radial offset shall be defined following:
|
@ansis made a good point on the PR:
I agree, it's more likely that designers will implement rectangular rather than elliptical icons, and an elliptical offset won't necessarily provide the optimal text offset against all rectangular icons. @mapbox/map-design-team let us know if you have feedback on this. |
@chloekraw @ansis ellipse corresponds better to radial offset property name as it has radius. In this perspective it looks like natural extension of the existing API. For rectangular offset, we could probably use the existing text-offset. Currently, it is disabled by both
We could allow only positive WDYT? |
The more I step back and contemplate this issue, the more I think that this is an unnecessary problem we created for ourselves by allowing corner placements as options in Whether icons are wide or tall, circular, square, or rectangular in shape or precisely tailored to the outline of a landmark, I don't think that text labels placed using the In fact, I think it would actually engender confusion if you mixed top/left/right/bottom placements with corner placements. Imagine icon A is placed to the left of icon B, icon A contains fairly long text placed at I can imagine a hypothetical avant garde map design that used all corner placements for text labels, emanating a unique artistic appeal. I can also imagine that there could be use case for corner placements on a map layer in which the icons aren't POIs and the corresponding text isn't POI names. But I think that we should have held off on supporting corner placements in the first iteration of I checked Google Maps and Apple Maps, and neither use corner placements for text labels. There are a few instances where I make this point not to suggest that we remove support for corner placements retroactively, but to propose that we close this issue and punt on implementing changes to EDIT: I should add that specifically, the problem we're seeing in prototype testing is that Anyone have alternate thoughts on this issue? @mapbox/gl-js @mapbox/map-design-team @ajashton @ian29 @mzdraper @amyleew @philogb @brsbl |
Gotcha, thanks. @pozdnyakov is that prototype with the elliptical pr you already have open or with a rectangular proposal? |
elliptical, but the rectangular would look the same, just API will be different. |
IMO rectangular proposal is better than elliptical proposal as it provides backward compatibility for the existing styles and applications without extra efforts. |
@pozdnyakov I think that makes sense! I haven’t totally thought through the backwards compatibility question, but if it is backwards compatible in all cases, then I think that’s how we should have supported offsetting text with variable label placement. Though, that said, I wasn’t a part of those design discussions and I think feedback from map design on this matter will be very valuable. Personally I have no objections to a prototype, especially if it’s not too much work. Conceptually I think it works to have |
I would keep |
Here is the "rectangular" approach prototype #8642 |
Stub ticket to capture customer feedback:
text-radial-offset
does not take into account symbol icon dimensions. Text withtext-radial-offset
may overlap wide or horizontally stretched icons with a"*-left"
/"*-right"
text-variable-anchor
position.cc @pozdnyakov @alexshalamov
The text was updated successfully, but these errors were encountered: