AnsweredAssumed Answered

JSAPI 3.29 - customTextElements supported?

Question asked by luckachi on Aug 9, 2019
Latest reply on Aug 22, 2019 by taungesriaustralia-com-au-esridist

First off, are customTextElements even supported in API 3.29? I have a Print dijit set up (code below) but I can't seem to get the customTextElements to show up on my layout. The customTextElements come directly from the Get Layout Templates Info Execute task. I would really like to be able to pass an array that is defined in PHP but the print keeps timing out. I swapped the arrays to just the letter "t" to see if that would work and again, it's timing out. I see that customTextElements are listed under the layoutOptions but you can't pass DynamicText? I am looking to display attribute information for the feature that is being printed by a URL parameter (ID) on the layout template.


  // print dijit
      var printer = new Print({
          map: theMap,
          url: "<server>",
          templates: [{
            label: "Map",
            format: "PDF",
            layout: "TREATMENTS",
            layoutOptions: {
              customTextElements: [
                  {"Target": "t"},
                  {"Date": "t"},
                  {"EPA": "t"},
                  {"Chemical": "t"},
                  {"Weather": "t"},
                  {"Title": "t"},
                  {"Year": "t"}
            exportOptions: {
              width: 772,
              height: 772,
              dpi: 200
      }, dom.byId("printButton"));