Hide underlying layers' labels

2506
4
03-22-2012 10:52 AM
NinaRihn
Occasional Contributor III
is there a way to hide the labels of one or more layers that are underneath another labeled layer?
Tags (2)
0 Kudos
4 Replies
JonMorris
Occasional Contributor II
Hi Nina,

I'm not quite sure what you're asking. Is it more than just turning off labelling for those layers?
0 Kudos
NinaRihn
Occasional Contributor III
Pretend you have two layers in an MXD and one of the layer's polygons overlap one of the other layer's polygons.   Is there a way to hide the labels for the polygon that lies underneath?
0 Kudos
JonMorris
Occasional Contributor II
Hi Nina,

I'm still not quite sure I understand the problem. You can turn off labelling for the layer underneath, but then you will get no labels for the whole layer. If the upper layer only overlaps some of the lower polygons and you do want some labels on the lower layers, you could try using label weights. If you give the upper layer a weight of 1000, labels from all other layers will avoid it. This may cause problems if you have other layers in the map that you don't mind labelling over the upper polygon layer.

As an alternative, you could use a GP tool to cut out the lower layer where they intersect and throw away the overlapping polygon sections.
0 Kudos
KCvidal
New Contributor

I had the same question and figured out a solution for me but I will elaborate on the issue before in case it is the same problem you are having.

I did find a workaround that worked for me so I put what I did below as well as a suggestion you can try in case my workaround is not an exact fit. Also, I hope by putting in more information about my initial issue that maybe someone can give alternate solutions that maybe work better.

The layers in the scenario

  1. I have a master layer that shows all the polygons for the area. It has a specific symbology and labeling expression.
  2. I have a child shapefile for just the polygons I am highlighting in my drawing. This layer has it's own symbology and label expression.

What I was trying to accomplish

  1. Hide the labels from the master layer with respect to the Child shapefile
  2. only show the labels for the child layer in the child layer polygons (not both the master layer's labels and child layer's labels)

What I tried

  1. I tried to find a way to hide the labels for the master shapefile by creating a mask
  2. I tried putting the master layer labels into the annotation.

What worked

  1. I looked at the master shapefile attribute table and noticed that there was a column that denoted each polygon as active, pending or retired.
  2. I then created a definition query on the master file to only show the active polygons. 

Suggestion

  1. If you do not have a column in your 'master file' that helps you determine the polygons you want to label, insert a column into your 'master file', and fill the cells for all polygons you do want to label (so for all but those that intersect your 'child file')
  2. Create a definition query in your 'master file' to only label the polygons you want to be labeled. (see the example of an attribute table below)
    • Definition query based on example table below would look like -->       [COLUMN_NAME] = [LABEL] 

Example of master shapefile attribute table after adding the column called [COLUMN_NAME] and filling cells for the polygons I do want to label.

FIDSHAPEOBJECTIDBLOCKCOLUMN_NAME
0Polygon1ALABEL
1Polygon2BLABEL
2Polygon3CLABEL
3Polygon4D<NULL>
4Polygon5E<NULL>
5Polygon6FLABEL
6Polygon7G<NULL>
7Polygon8HLABEL

I hope this helps.