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

Text wrap not working on line labels #2336

Open
sheikh-iffi opened this issue Nov 15, 2022 · 4 comments
Open

Text wrap not working on line labels #2336

sheikh-iffi opened this issue Nov 15, 2022 · 4 comments

Comments

@sheikh-iffi
Copy link

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

  • Add text_wrap under text in any line data.
  • Tried both text_wrap: 5 and text_wrap: true

RESULT:

Whole Label appears in one line

EXPECTED RESULT:

Label should appear in multiline as done in tangram JS

ENVIRONMENT:

  • Tested it on 0.17.1 and both on linux and android

OTHER
Tried line break as well but that didn't work as well. Check image below

image
image

@hjanetzek
Copy link
Member

hjanetzek commented Nov 15, 2022

Hi, multi-line text labels are not implemented for road-lines in tangram-es - it's probably quite a bit of work to implement and computationally expensive for curved line labels. Interesting idea though.

@sheikh-iffi
Copy link
Author

sheikh-iffi commented Nov 15, 2022

But @hjanetzek multi-line text labels are implemented for point in tangram-es. Check Image above.
Curved line labels would be a different case.

@hjanetzek
Copy link
Member

Ah I see, if you add points along roads to your dataset you could use point multi-line labels. Would be nice and not too much work if tangram-es could generate these points but I think it's not implemented yet.

@sheikh-iffi
Copy link
Author

I just changed wordWrap to true here and labels on roads are now multi-line. Is there any reason that this was set to false?

params.wordWrap = false;

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants