Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i am working in arcgis desktop with eclipse in java. i have created a textsymbol and added it to a textelement which i need to add on another layer(the model is a 3Dglobe and not a map). i am able to add the textelement but it is ignoring all the lines and even spaces. the spaces and newline are properly printed in mapbean.as per this link circlecallout but it is not working when i add it to a 3d layer.

eg. for string s="try \n harder"

the output in textelement is tryharder

below is the code

           TextSymbol textSymbol = new TextSymbol();
           customCircleCallout.setColor(color);
           textSymbol.setBackgroundByRef(customCircleCallout);
           textSymbol.setColor(color);
           textSymbol.setFont(font);
           textSymbol.setSize(20);

           TextElement textElement = new TextElement();
           textElement.setScaleText(true);
           textElement.setSymbol(textSymbol);
           textElement.setText(s);



           IElement e=new Text3DElement();
           e= (IElement)textElement;    

           e.setGeometry(point);

i need output in multiple lines and i can't even get the string separated by spaces in textelement.

share|improve this question
    
there was a similar question in in arcPy string is overlapping, where we could insert newline using \r\n in place of \n but even that does not seem to work in java. –  Ankit Jun 28 '13 at 11:34
    
the only adjustment i have been able to do is to store all the lines in multiple TextElement, and adjust there elevation to create a projection of multiple lines. But it is not convincing enough. –  Ankit Jul 1 '13 at 5:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.