A question about multi-lines label using osgEarth::LabelNode or osgEarth::PlaceNode #2652
Unanswered
XianranZ
asked this question in
Support Q&A
Replies: 1 comment
-
Multi-line LabelNode appears to be working. I hacked the LabelNode* label = new LabelNode("Rhumb\nline\npolygon", labelStyle); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I used the osgEarth::Label or osgEarth::PlaceNode to add a text label or a icon-text label,
I found that the text can only have one line. Although I used a '\n' to force a newline in std::string, such as 'text1\ntext2', the text only has one line. Why the '\n' does not work?
So, I try to write a custom class to add multi-lines text label, naming CMultiLineLabel. I use two labelnode to add two lines text label. But a new problem arises. When I zoom in or out on the globe, the spacing between these two lines changes. How can I keep them the same?
I will appreciate it if you can help me!
Beta Was this translation helpful? Give feedback.
All reactions