Trying to add print templates

5042
9
Jump to solution
01-21-2015 08:45 AM
JssrRR
by
Occasional Contributor II

Hi,

I was trying to add print template widget to my so far working application, the print widget is seems to be working now but everything else is not, even the feature layers are not showing up. I am not using our arcgis server but the the arcgis online, sample server URL, to do the print task, could that be the reason? If anyone can please take a look at my code and help me figure out the problem, that will be great, thanks!!

Here is the link to the JS fiddle with my code :

Work on templates for printing - JSFiddle

1 Solution

Accepted Solutions
MahtabAlam1
Occasional Contributor

I looked at Tim's JS Fiddle sample.

On print it's giving following error:

{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"graphicsLayer4\": Unsupported 'style' in symbol: esriSLSShortDashDotDot.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}

Changing the circle's line symbol to solid worked. Try it at your end.

View solution in original post

0 Kudos
9 Replies
ChrisSergent
Regular Contributor III

Could you post the code that worked before you added the print task?

0 Kudos
JssrRR
by
Occasional Contributor II
0 Kudos
TimWitt2
MVP Alum

I get the following error in the developer tools:

Uncaught ReferenceError: FeatureLayer is not defined

TimWitt2
MVP Alum

Saloni,

On line 184 your are closing your require function, thats why FeatureLayer is not defined. If you moved the }); to the end it works.

See here Work on templates for printing - JSFiddle

Tim

JssrRR
by
Occasional Contributor II

Tim,

Thanks for looking at this, yes now the points are showing up.

The print digit is working, but not the print task. Once you click on a point to select points within the buffer distance and then try to print, it does not return a printout. Still have to figure out why that is not working.

0 Kudos
MahtabAlam1
Occasional Contributor

I looked at Tim's JS Fiddle sample.

On print it's giving following error:

{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"graphicsLayer4\": Unsupported 'style' in symbol: esriSLSShortDashDotDot.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}

Changing the circle's line symbol to solid worked. Try it at your end.

0 Kudos
JssrRR
by
Occasional Contributor II

Mahtab,

That worked!! How do you get the error report what did you use to generate that, would like to know that for future use.

Thank you very much for solving the issue.

0 Kudos
MahtabAlam1
Occasional Contributor

I am glad that your issue is resolved. I use chrome browser's "Developer Tools" . You can open it by pressing F12 and then go to Network tab. It will list all the request that have been processed. Then you just need to look for the request that you want to investigate. It will give the request and it's response. Other browsers also have more or less similar features.

JssrRR
by
Occasional Contributor II

Mehtab,

I do use the "Developer Tools" but I guess did not know where to look specifically, I went to console but could not figure out much from there. Will  have to work on debugging tools.

Thanks for the explanation and answering my question.

0 Kudos