Home
All Communities
Products
Developers
Industries
Global Communities
Services & Learning
Networks
Esri Events
ArcGIS Topics
User Groups
Events
ArcGIS Ideas
Community Resources
Community Blog
Community Feedback
Community Help
Member Introductions
MVP Program
Discussions
Help
Domů
Vývojáři
Developers - General
Multiline Text symbols ibn ArcGIS JavaScript API
ManishkumarPatel
Hi,
It would be nice to have an option for providing multiline text symbols.
var smTxt = "Line 1 text here \n Line 2 text here";
var textSymbol = new esri.symbols.TextSymbol(smTxt, font, new dojo.Color([0, 0, 0, 1]));
Results is displayed as below:
Line 1 text here \n Line 2 text here
Instead should be displayed as below:
Line 1 text here
Line 2 text here
A simple idea may save lot of time for handling this kind of situtations.
Hoping this implements soon.
Best Regards,
Manish Patel
Najděte více příspěvků označených jako
Status: Otevřít
Komentáře
SimonUyttendaele
See :
https://github.com/Chaussette/esri.symbol.MultiLineTextSymbol
Lets hope esri includes this in the API officially...
John_S
The Javascript how you describe it working is working correctly. \n does not mean anything except \n in javascript / html. \n is the new line character for python, so when you're calculating, scripting, labeling, etc... using python, you definitely want \n to create a new line. In javascript / html the new line is handled by the break tab <br />. If you need a new line, you should either use the break tag as you're constructing the string or if your string already has \n in it, you should run a find and replace to replace the \n with the break html tag.
Připojte se k diskusi
Přihlaste se pro psaní příspěvků, sledování obsahu a další. Jste tu noví? Zaregistrujte se zdarma.
Přihlásit se
Registrovat
Rychlé odkazy
Všechny komunity
Nedávné příspěvky
Uživatelské skupiny
Sledovaný obsah
Pomoc komunity