Is it possible to create a stacked textSymbol? If so, what is the syntax for the linebreak?
Tracy, I able to get this to work. You can save the js file - esri.symbol.MultiLineTextSymbol.js and then just add this:
<script type="text/javascript" src="js/esri.symbol.MultiLineTextSymbol.js"></script>
Hope this help.
Thanks.
I usually just add two symbols and adjust the yoffset value. I'm guessing the same approach was wrapped up nicely in the referenced github lib.
Update: I couldn't get this to work for me either. Maybe it's too out of date, although it did say it was 2014, which isn't that old.
That didn't work, but this looks like a possibility. I haven't tried it yet. suytt/esri.symbol.MultiLineTextSymbol · GitHub
How about trying the ASCII character code for line break, carriage return, etc?
var text = 'This is line one' + String.fromCharCode(10) + 'This is line two';
I tried \n already, but that didn't work. I also tried , but nothing. It just prints them as characters. I also tried <br>.
in python it is "\n" in some environments it is "" might be worth a try since I found one example in this environment
https://community.esri.com/message/430718#430718
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.