{"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":[]}}}
Solved! Go to Solution.
template.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" }
]
};
"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"
}
]
}
"layoutOptions":{"titleText":"my map title", "customTextElements":[ {"legalDescriptionText":"BEG 82.5 FT E NE COR BENTON & WALNUT STS E 82.5 FT N 267 FT W 82.5 FT S TO BEG"}, {"subTitleText":" E WALNUT ST"}]
this.templates.layoutOptions.titleText = printTitle;
dojo.connect(printer, "onPrintStart", function(){ //console.log("onPrintStart: fullLegalString = " + fullLegalString + "print_subTitle = " + print_subTitle); var printTitle = dojo.byId("txtTitle").value; for (var i = 0; i < templates.length; i++) { this.templates.layoutOptions.titleText = printTitle; this.templates.layoutOptions.customTextElements =[ {"legalDescriptionText": fullLegalString}, {"subTitleText": print_subTitle} ]; } });
I'm having a real hard time spotting the typo, but I think I'm missing an ending curly brace to close out value of layoutOptions.
console.log(this.templates.layoutOptions)
to make sure that object looks good.I'm still trying to decide if my service is OK. I'm having a really hard time testing it without programming something.
I switched my print service from Asynchronous to Synchronous and that seems to have made the difference. (Although I still think it's gremlins.) In the instructions for authoring it suggested you can use either for your Execution Method. I didn't find that was the case!