AnsweredAssumed Answered

Problem accessing custom text elements in my print service

Question asked by schlot on Jun 5, 2013
Latest reply on Jun 10, 2014 by mvolz47
I created a copy of the basic exportmaptemplates to make my own custom layout.  I needed to add both subtitles and descriptive text to my layout.  I added two new text elements and gave them element names of subTitleText and descripText.  Just to have something to see on my map, because I'm going to change these programmatically, I've given them a text value the same as the element name.

I didn't receive any errors when I published this print service, so I'm thinking the service itself is OK?  I'm having some problems with the syntax of referencing these new elements.

I'm using the JS API, and in Firebug, I can see the call getting made to the print service.  It includes the custom text elements by their element names, with the values that got assigned in my code.  I am getting an error in my JS code, but if I copy/paste the string that's getting submitted to the print URL, it does generate output.  It just doesn't include the new values I'm assigning for subTitleText and descripText.  It's still just the default string I put in as a placeholder.

 {"mapOptions":{"showAttribution":true,"extent":{"xmin":-10391169.27082235,"ymin":4469925.719133955,"xmax":-10383726.21519309,"ymax":4476250.883224546,"spatialReference":{"wkid":102100}},"spatialReference":{"wkid":102100},"scale":36111.90964300888},"operationalLayers":[{"id":"streetMap","title":"streetMap","opacity":1,"minScale":591657527.591555,"maxScale":1128.497176,"url":"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"},{"id":"countyLayer","title":"countyLayer","opacity":1,"minScale":0,"maxScale":0,"url":"https://ogitest.oa.mo.gov/ArcGIS/rest/services/BaseMap/county_simple/MapServer","visibleLayers":null,"layers":[]},{"id":"status_stateOwnParcelLayer","title":"status_stateOwnParcelLayer","opacity":1,"minScale":0,"maxScale":0,"url":"https://ogitest.oa.mo.gov/ArcGIS/rest/services/StateOwnedParcels/MapServer","visibleLayers":null,"layers":[]},{"id":"allParcelLayer","title":"allParcelLayer","opacity":1,"minScale":0,"maxScale":0,"url":"https://ogitest.oa.mo.gov/ArcGIS/rest/services/allParcels/MapServer","visibleLayers":null,"layers":[]},{"id":"stateOwnFeaturelayer","url":"https://ogitest.oa.mo.gov/ArcGIS/rest/services/StateOwnedParcels/MapServer/1","title":"stateOwnFeaturelayer","minScale":1155581,"maxScale":0,"layerDefinition":{"drawingInfo":{"renderer":{"type":"simple","label":"","description":"","symbol":{"color":[255,211,127,255],"outline":{"color":[110,110,110,255],"width":0.4,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"}}}}},{"id":"mapDiv_graphics","minScale":0,"maxScale":0,"featureCollection":{"layers":[{"layerDefinition":{"name":"polygonLayer","geometryType":"esriGeometryPolygon"},"featureSet":{"geometryType":"esriGeometryPolygon","features":[{"geometry":{"rings":[[[-10387278.9405581,4472649.14459539],[-10387279.6215167,4472629.95429174],[-10387325.6367082,4472631.12368592],[-10387325.6625458,4472633.30616325],[-10387325.8529157,4472641.81899572],[-10387325.6180643,4472650.3308426],[-10387278.9405581,4472649.14459539]]],"spatialReference":{"wkid":102100}},"symbol":{"color":[33,237,254,13],"outline":{"color":[33,237,254,255],"width":2.25,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"}}]}}]}}],"exportOptions":{"outputSize":[800,1100],"dpi":96},"layoutOptions":{"titleText":"just something","customTextElements":{"descripText":"BEG 192.1 FT S SE COR KANSAS & KEARNEY STS S 50 FT E 160 FT N 50 FT W TO BEG11/29/22 (EX W 20 FT)","subTitleText":" 2331 N KANSAS AVE"},"scaleBarOptions":{"metricUnit":"Kilometers","metricLabel":"km","nonMetricUnit":"Miles","nonMetricLabel":"mi"},"legendOptions":{"operationalLayers":[]}}}


Am I misunderstanding how to include these custom text elements?  Should they not be nested within the layoutOptions the way I have them?  Sorry about the big long JSON string, that's just the way it came out when I copied from Firebug.

Outcomes