Select to view content in your preferred language

PrintTask.PrintAsync: Labels disappear

4258
3
10-28-2014 06:19 AM
PetteriFischer
Deactivated User

I have got another problem similar to this one:PrintTask.PrintAsync: Features don't disappear

BTW, thanks for the prompt and good answer to the above one! It works for me.

We are showing labels on a FeatureLayer by adding AttributeLabelClass to FeatureLayer.Labeling.LabelsClasses.

This works fine, Labels are shown on the MapView.

But when using PrintTask.PrintAsync the labels are not shown on pdf, gif etc. document.

0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

The labeling options for FeatureLayers and GraphicOverlays available in the public/client API are significantly more advanced than the labeling supported by the REST-based print service. At this time it is unfortunately not possible to honour the labeling you have defined via the API in the print service. This is a known limitation and we are considering ways in which we could fallback to a supported set of properties but this may result in a discrepancy between what the user sees on the map and what is in the printed output, which is typically not acceptable.

Cheers

Mike

0 Kudos
TuukkaJärvinen
Deactivated User

Hi,

Is there any way to get any visible labeling for a map printed with PrintTask?

0 Kudos
TuukkaJärvinen
Deactivated User

I still have problems with Print.Task and labels.

I want to print a map where I show only features based on expression and I also need to show labels for these features. So far I'm able to limit features by setting a where clause on feature table of FeatureLayer and adding it to MapView to be printed or by adding the features I want to print to a graphic layer as graphics and adding it to the MapView. However, In these both cases the printed output does not contain feature labels.

The labels are visible if I add the layer to MapView as ArcGISDynamicMapServiceLayer from the MapServer but in this case the layer definitions don't seem to affect feature visibility in the print result.

Is there way to show the labels and hide features based on expression at the same time?

0 Kudos