Legend doesn't appear when printing out cached services

3075
8
02-05-2016 08:13 AM
PabloIzquierdo1
New Contributor III

I'm having problems printing out tiled services in WAB, I'm caching and hosting the services in ArcGis for Server and then consuming them in a WAB app, for now, I'm not using the developer version of the WAB, but I will. As you can see in the example below, it should show three layers in the legend, but the tiled services don't appear. Any idea why? can it be related to the security of my server? or perhaps the setting of the cached services?

b7580bd6691b4901a96ebf96136c1de4.jpg

0 Kudos
8 Replies
JonMorris2
Occasional Contributor II

How many symbols are missing from your legend? We recently had the same problem and it seems to be due to ArcGIS dropping items when they don't fit.

Even if part of an item does not fit, the entire legend item is going to be dropped from the legend. For example, if only 10 classes from a 15 class legend item will fit, the entire item will be dropped, not just the 5 classes that do not fit. At this point the legend will stop trying to add items even if another legend item later in the list would fit.

From Working with legends—Help | ArcGIS for Desktop​ (about 2/3 of the way down the page).

We tried creating a two-page mxd template, but that is not supported, so our solution was to create a new template mxd (called 'Legend Only') where the legend took up the whole page and the dataframe was so small you couldn't see it. Now users can do two exports - one with the map and one with the legend.

MichaelVolz
Esteemed Contributor

You'll need to make these layers part of a dynamic mapservice to get the layers to show in the legend for the print.  Can you use scale dependencies to make the layers more responsive if they are heavy layers (lots of vertices)?

0 Kudos
PabloIzquierdo1
New Contributor III

The legend should be like this

legend.png

The space in the print template shouldn't be a problem. Also, I've tried to make the area for the legend bigger and still doesn't show these layers.

0 Kudos
MichaelVolz
Esteemed Contributor

Have you made the tiled mapservices into dynamic mapservices in order to display that legend?

0 Kudos
PabloIzquierdo1
New Contributor III

I've tried publishing dynamic map services cached and not cached, the non-cached shown the legend in the printout but the performance of the layer is poor, and the cached doesn't show the legend as the non-dynamic cached services. Do you think this it can be fixed using the developer version of WAB?

0 Kudos
PabloIzquierdo1
New Contributor III

I've created a new map with the same layers but instead using the WAB I'm using the basic viewer template and on this template the print functionality shows the legends for the cached layers.

MichaelVolz
Esteemed Contributor

Pablo:

I believe I was confusing a BaseMap with a cached mapservice.  BaseMap layers do not appear in the legend, but I guess cached mapservice layers should appear in the legend.  My organization used the JavaScript API to create custom apps and we so far only use dynamic mapservices and BaseMaps, no cached mapservices that are not considered a BaseMap as the performance of ArcGIS Server is very good for my organization.  I would contact ESRI tech support at this time to see if they can duplicate your issue so it can be logged as a true bug.

Mehretab
Occasional Contributor

Unfortunately it is a know bug in Web Appbuilder's Printer. But if you still want to with WAB for developer edition you can use the piece of code provided in this thread

0 Kudos