symbols/TextSymbol breaking into multiple lines

1478
6
Jump to solution
12-19-2018 07:27 AM
RomanKönig
New Contributor III

In API 4.9 a TextSymbol with a long text was displayed in a single line.
In API 4.10 the text breaks into multiple lines at around 120px width.

Is this the expected behaviour in 4.10?
Is it possible to prevent longer text from splitting into multiple lines or increase the maximum width of the text?

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

TextSymbol.text has a max length cap and sounds like you are hitting the max. Please the doc.

https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text

View solution in original post

6 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Your observations about TextSymbol is breaking into multiple lines is correct. We will look into this in future release.

Thank you for bringing this issue to our attention.

Undral

RomanKönig
New Contributor III

Thanks for your information!
There is an undocumented width-property on the symbol, but setting it would not change anything.

If you have any suggestions about a workaround in 4.10, please let me know.

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

At this time, I do not have workaround for the behavior. 

-Undral

0 Kudos
RomanKönig
New Contributor III

In API 4.11 the text symbol still breaks into multiple lines, just later (at around 200px) than in 4.10 (at around 120px)

Doe you maybe have any further infos on that?

0 Kudos
UndralBatsukh
Esri Regular Contributor

TextSymbol.text has a max length cap and sounds like you are hitting the max. Please the doc.

https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text

RomanKönig
New Contributor III

Thanks for information - i overread this.

0 Kudos