Select to view content in your preferred language

Unwanted Legend Item Appears After Export

9305
21
08-28-2020 04:56 AM
RyanBarber1
Occasional Contributor

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 Kurtis, 

I'm glad you found a way around this issue.  We have resolved the export issue (issue #1) where this type of layer displays in the export result even if removed or if the visibility is unchecked. 

However, we are still working on excluding Map Service layers that have have no legend info from the legend (issue #2). Some Map Service layer do have legend items, so we need a way to distinguish the difference and that may require work from multiple parts of the software stack. If this fix doesn't get into 2.7 you will be able to remove the Map Service layer item from the legend and not see it in the export result.

As far as I know the work around is applicable for the World_Transportation service layer. I was able to exclude this layer from the legend using this work-around described above:

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.

1. Select the layer in the Contents pane under the "Map" node that you want in your legend - in the order you want them to appear in the legend top-down

2. Insert the legend

If these are the steps you are taking and you are still seeing the World_Transportation layer in the legend - then this is a different bug and should be passed along to https://support.esri.com/en/contact-tech-support.

Thanks for the feedback, 

Tom

0 Kudos
trw_ri
by
Emerging Contributor

Hi - I jumped into this thread because I am having a similar issue when trying to export a layout (either JPG or PDF) using ArcGIS Pro 2.7.3.  In my case, the unwanted legend layer is the NOAA Raster Chart map service.  I have tried rebuilding a new legend with only a few selected layers included, but the exports still included the NOAA Raster chart layer in the legend.  The only way I found to eliminate this legend entry was to turn the NOAA Map Service layer off in the TOC (though that layer is helpful for the layout).  This is not a big issue for where we are in this project, so don't want spend lots of time investigating a work-around.  Hopefully a fix will be incorporated into some future software update.  Thanks - Tom

0 Kudos
dns
by
Occasional Contributor

I am running 2.7, selecting only the layers I want, then Insert-> Legend and I am still getting unwanted raster layers in the legend upon Export.

How does the flagship desktop GIS software for your platform still have this bug in its latest release? It's truly bizarre.  I appreciate the presence on this community forum to walk us through it, but it's so disappointing to have to fiddle with this still.

JustinJohnston
Frequent Contributor

I am still having the issue as well.  None of the workaround above work and I am also running 2.7.  I have no idea what to try to fix it at this point. 

0 Kudos
JustinJohnston
Frequent Contributor

OK, I found a solution that worked for me!  After doing the workarounds above to create the legend without having the offending map service layer and before printing, I opened the legend properties and unchecked ALL of the synchronization settings.  Open the legend Options, expand Synchronize with map, uncheck all 4 boxes.  By default, I believe "Layer Visibility", "New Layer", and "Rerference Scale" are selected.  You might be able to unselect only one or two of those, but I unchecked all and it worked!  Legend without the map service layer!

Cheers,

Justin

AngusWarfieldMc
Occasional Contributor

This is still happening in 2.9. I can confirm turning off all the synchronization settings worked for me. Thanks!

0 Kudos
RayMcPherson
New Contributor

I'm running in 2.9.2 and turning off just the "New Layer" option in the Legend settings worked for me. Thanks!

0 Kudos
JenD
by
Emerging Contributor

Oh, thank goodness!  None of the workarounds above worked for me either (2.8.6) but this seems to, and I hope for everyone else till it's fixed - thanks so much!!

0 Kudos
PeteJordan
Frequent Contributor

Not sure if this is exactly the same thing, but seems like it and I am using 2.7.  I've documented what I call Ghost Layers in the Dynamic Legend.  This is where a legend shows the layers you want and looks good, and like the OP stated, upon exporting to a *.jpg, suddenly the legend shows the [...] meaning there are hidden layers (Fig 1.jpg).

Expanding the legend, I see a lot of layers on my map that were not included in the legend at all.  Looking at the layers in the legend, they don't appear to show up either, but they show in the legend itself on the map (Fig 2.jpg) - The red shows what should be displayed and what the legend shows is displayed, the blue is what the legend in the map is actually displaying.

  My solution that I find works, is to just delete the legend, then use your <Ctrl-z> to undo the delete and then I always find all those hidden "ghost" layers now displaying in my legend in the Contents Pane.  They are always listed below my last layer I want displayed.  So it's easy to just select all those unneeded layers and delete them and then resave the project and re-export and I haven't yet had a map with it coming back after doing this (Fig. 3).

 

Note: My figures were taken from various maps I've experienced the issue with and not the same map, but the general principle is the same.

 

  Just my little fix for something similar or even the same issue.   Hope it helps...

 

0 Kudos
JenniferBorlick
Frequent Contributor

Just throwing it out there that I'm in 2.8.1 and the issue is still here. I used the workaround, plus turned off the synchronization and then it works. It should also be noted that the legend items weren't spaced correctly initially. They were overlapping. This was fixed using the work arounds supplied.