Unwanted Legend Item Appears After Export

7794
21
08-28-2020 04:56 AM
RyanBarber1
New Contributor II

Working in ArcGIS Pro 2.6, I'm trying to export a figure with Esri's "World Transportation" layer in the map. I have the layer unchecked in the legend, but when I export to PDF, World Transportation is in the legend (the group heading, too). Removing the layer from the legend portion of the TOC doesn't solve the problem- it appears in the legend unless I remove the layer from the map entirely.

21 Replies
TomBole
Esri Regular Contributor

Hi Ryan, 

This is a bug and may be related to an existing issue - BUG-000131306. I'll make sure your scenario is included. It is important to note that removing the item from the legend will not remove it from the export.

To get around the bug you will need to create a new legend that does not include this layer when the legend is created. You can do this in two ways. As you point out you can create the legend first and then add the service to the map.  If the service is already in the legend you can create a legend without this layer by selecting the layers you do want in your legend and then insert the legend.

From Add a legend—ArcGIS Pro | Documentation 

Optionally, if you don't want all the layers added to the legend, expand the map in the Contents pane and select the layers to add to the legend. If no layers are selected, a legend is added containing all applicable layers from the map contained in the default map frame.

We hope to have this issue addressed by the next release.

Thanks for the feedback, 

Tom

RyanBarber1
New Contributor II

Thanks, Tom!

0 Kudos
RyanBarber1
New Contributor II

Hi Tom,

I'm running 2.6.1 now, and had the same issue again. Your solution still worked, but I wanted to let you know that it's still happening.

Thanks,

Ryan

0 Kudos
TomBole
Esri Regular Contributor

Hi Ryan, 

We have fixed this issue and will be available with the 2.7 release.

Tom

CaroleCarpenter
New Contributor

Hi!,

Making a new Legend didn't work for me. I had to cover the items in the legend with a white box. This work around doesn't always work when working with Map Sheets though. I work for a pretty big organization and we make a lot of figures and this is a REALLY big issue. Any chance this can be released in a Patch and not wait until 2.7. We are working in Pro 2.6.

Thanks!

0 Kudos
TomBole
Esri Regular Contributor

Hi Carole, 

I'm assuming that the "extra" legend items are coming from an ArcGIS Map Service layer.  If they are not, if the data source is local like a file geodatabase, then this is a different bug. If so, please let us know because at this time I'm only aware of this issue being particular to ArcGIS Map Service layers.

To get around the bug you will need to create a new legend that does not include this layer when the legend is created. You can do this in two ways. You can create the legend first and then add the service to the map.  If the service is already in the legend you can create a legend without this layer by selecting the layers you do want in your legend and then insert the legend.

 

From Add a legend—ArcGIS Pro | Documentation 

 

Optionally, if you don't want all the layers added to the legend, expand the map in the Contents pane and select the layers to add to the legend. If no layers are selected, a legend is added containing all applicable layers from the map contained in the default map frame.

 

Did you try either of these workarounds? If you did please let me know of the steps you took.  I may have missed something in the workaround and would really like to get you to a workaround that is not putting a white box over the extra items if possible.

We are currently evaluating if this something we can include in a service pack.

Thanks for the feedback, 

Tom

0 Kudos
JustinJohnston
Occasional Contributor II

I am still having this same problem in ArcGIS Pro 2.7.0.  The workarounds above are also not working.  I have a map service providing aerial imagery that will not leave my legend when I print.  I have not tried to see if Export works any different from Print yet.  I will try that next.

Cheers,

Justin

SamLewis
New Contributor

I was not able to resolve this issue using the work arounds posted, but found that if I just removed everything from the existing legend and then re-added the items I needed (click-dragging in the contents pane) one at a time it no longer printed the unwanted entries when exporting to pdf.

The unwanted legend entries were coming from ArcGIS Map Service (imagery) layers.

KurtisKettler
New Contributor

None of the mentioned workarounds worked for me. I am running Pro 2.6.2, and specifically trying to use World Transportation from (Reference/World_Transportation (MapServer) ) and it still adds 'World Transportation' in my Legend. I fully turn off the Legend(s) in my TOC, export it out, and all that draws in my legend is 'World Transportation'. What finally worked for me was to select the layers I wanted in my Legend, inserted it, and converted to graphics. This was the only way to rid my legend of the 'World Transportation' text. I am hopeful that the 2.7 release will fix this bug.