I've seen a lot of the textsymbol questions in the forums here and have tried every one of them. My issue is the textsymbol doesn't show up at all on the print. It shows on the map as built. Here's the code as to how I'm putting this together. I also tried putting this layer together by itself (to take the fact there are multiple graphics layers out of the scenario) and still getting the same issues. Here's my method:
Solved! Go to Solution.
Thanks Dean Wilson.
It looks like the graphic layer that your JS code creates to show text, are of polygon type. That is currently not supported in print services.
Try change that to point geometry type. That should make it to work.
see the attached .zip file that is a modified version of what you sent me. if you use that in a request to your print service, you should see one feature gets labeled (to keep it simple, I removed all other labels from the json).
hope this helps.
Bumping this question.... Just checking to see if I should word this any different maybe? Still not functioning right.
featureLayer.applyEdits({ addFeatures: features });
You should probably look into labeling if you're trying to label graphics.
Thanks for the tip. I'll look into the labeling part of it. But, what if I only have a text symbol? Those are the things that aren't printing. I can take out the other graphic features and just leave the textsymbol and it doesn't show up in the print.
P.S. I didn't add this before, and I should have, but I'm using the 3.x api, not the 4.x..
I did a quick sanity check and I am able to print TextSymbols with 3.29. Couple questions for you:
1) What (ArcGIS Server) version of the print service are you using? If you try the AGO print service, do you get the same result?
printUrl = "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";
2) Are you adding those TextSymbols as a GraphicsLayer to a FeatureLayer through the applyEdits() method? Do you see the TextSymbols in the printout if you just add the GraphicsLayer (or each Graphic) to the map?
Hi Noah,
To answer your questions:
1) We're using arcgis server 10.4.1 for all of our services, including the print service.
2) Yes I'm adding the textsymbols as graphics to a featurelayer thru applyEdits(). The textsymbols are on the map as displayed, just not in the prints. The rub with all of this is I'm building the feature layers off of a featurecollection that uses the attributes that I make, not the arcgis server. Maybe thats the issue but I'm not 100%. There's really not much I can do about that because I'm pulling the attribute data from a third party sql server on premise, and not attributes from arcgis. Hopefully that makes sense.. let me know if i have to explain that different.
-Dean
Thanks Dean. There were two other things I was hoping you could test. I'll re-word the second to make it more clear:
1) If you try the AGO print service, do you get the same result?
printUrl = "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%...";
2) Do you see the TextSymbols in the printout if you just add the GraphicsLayer (or each Graphic) to the map instead of adding them to a FeatureLayer first?
Noah,
The print widget that I'm using (I'm utilizing the print widget from webappbuilder) Won't take the url that you mentioned when I put it in the config for "serviceUrl". Any ideas on that?
I did add the textsymbols straight to the map using:
But still not showing on the print. It may be the print service in 10.4 has a bug in it.. Not sure how I can test that other then upgrading the arcgis server we have on-premise.
Another bump on this question. I've tried the few things Noah mentioned but to no avail. Is this a print service issue that's used in 10.4 server?
Bump! Hopefully this doesn't fall into the GEONET black hole..