Select to view content in your preferred language

Edit "MAP_ONLY" in the Print dijit

1433
1
05-10-2016 12:03 PM
ElizabethMiller
Regular Contributor

I'm using the Print dijit -- how can I edit "MAP_ONLY" in the print layout dropdown list? I would like to get rid of the allcaps and underbar.

0 Kudos
1 Reply
KellyHutchins
Esri Frequent Contributor

Are you using code similar to the Print Sample in the help?  If so you can modify the names when you loop through the list of templates to add them to the print widget. Here's an example where we check for a value of "MAP_ONLY" and modify it to Map.

  templates = arrayUtils.map(templateNames, function(ch) {
            if(ch === "MAP_ONLY"){
              ch = "Map";
            }
            var plate = new PrintTemplate();
            plate.layout = plate.label = ch;
            plate.format = "PDF";
            plate.layoutOptions = { 
              "authorText": "Made by:  Esri's JS API Team",
              "copyrightText": "<copyright info here>",
              "legendLayers": [], 
              "titleText": "Pool Permits", 
              "scalebarUnit": "Miles" 
            };
            return plate;
          });