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 have a point feature class that I am labelling with the string "EXIT" for a majority of points, but some points will be longer, such as "EXIT into Pacific".

I wrote a labeling script that will create a new line after "EXIT", but not after "into" because I want to keep "into Pacific" on one line.

I want the label to show up like this:

     EXIT
 into Pacific

But instead, it automatically creates a new line and shows up like this:

     EXIT
     into
    Pacific

Is there a way to keep ArcMap from automatically creating a new line for the label? Or is there a good invisible character that will make the program think that "into Pacific" is one string with no white space?

Here's my script:

function FindLabel ([TYPE]){
var exitSlice
var intoSlice
intoSlice = ""
var label
var field
field = [TYPE]
exitSlice = field.slice(0, 4)
if (field.length > 4) {
    intoSlice = field.slice(5)
    label = exitSlice + "\n" + "<ITA><FNT name='Melior' size='8'>" + intoSlice + "</FNT></ITA>"
    }
else {
    label = exitSlice
    }
return label}

I'm pretty confident the script isn't causing the extra newline between "into" and "Pacific".

share|improve this question
    
Can you post your script? –  Jakub Sep 9 '10 at 0:02

2 Answers 2

I answered this over in this other question, with a reference back to this one. Short version is that with Maplex, you can probably do it, but I don't think that there's a solution you can apply to an individual label, unless you're willing to make annotation on a case-by-case basis (editorial comment:ick).

share|improve this answer

Is this without Maplex? (I assume since it isn't mentioned). You might try setting your labelweight higher. I'm not sure how to apply it in script form but the Maplex engine at 10.0 defaults to stacked labels with space and comma as splitters.

Here is the Jave api for Maplex... resource center

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.