Select to view content in your preferred language

How to hide labels if they are covered by another layer's polygon

5843
6
04-25-2016 12:19 PM
JugalPatel
Deactivated User

So I'm working on mapping rooms for different floors in a building and am having trouble with the way my labels are displaying.

For example, if a label for a room on the second floor overlaps with a label for a room on the first floor, then only the second floor label shows up and the first floor room label becomes hidden. However, if a polygon for a room on the second floor overlaps with a label for a first floor room, then the first floor label still displays.

Does anyone know how I can get labels to hide if anything like other labels or polygons in another layer is overlapping them?

0 Kudos
6 Replies
BenjaminMittler
Frequent Contributor

I would recommend looking into the feature weight settings and label priority setting within the maplex label engine. If you spend some time tweaking these you may be able to get the result you are looking for.

AdrianWelsh
MVP Honored Contributor

Hi Jugal,

I agree with Benjamin. Take a look at the Maplex label settings and mess around with them until you get the results you want. Labels are rather finicky and will take a lot of toying around with in order to get the desired result.

This resource might help if you are not familiar with Maplex:

A quick tour of labeling with the Maplex Label Engine—Help | ArcGIS for Desktop

0 Kudos
JugalPatel
Deactivated User

Great! Thanks so much. So if I take my map in ArcGIS desktop, enable the Maplex Labeling Engine and then configure the label settings, will those settings be able to transfer over to an ArcGIS online application?

0 Kudos
AdrianWelsh
MVP Honored Contributor

Are you able to publish your service to ArcGIS Server? If so, then the labels should be able to carry over. As for really specific behavior, I'm not sure. I suppose you would just have to do some specific things and see what happens.  Though, I do believe that they should carry over just fine.

But, this won't work if you are not publishing the service as a Map Service to ArcGIS Server (for AGOL, that is)

0 Kudos
JugalPatel
Deactivated User

Yes, I can publish the service but I am not sure the MapLex Engine will be able to help. On the desktop side, all of the data in my map is in one layer. Then, when it's published to AGOL, that one layer is filtered (by floor of the building) to separate layers. It looks like because of this, the solution to reorder the layers will have to take place on the AGOL and Javascript API side, rather than the desktop side.

0 Kudos
AdrianWelsh
MVP Honored Contributor

Jugal,

I think the Maplex label engine is really the only real option here (unless you mess around with having labels visible and not via JavaScript like you mentioned). So, therefore, it sounds like you will have to make this a custom map via ArcGIS API for JavaScript and go that route. But, it might not hurt trying what you can without custom programming, at least initially.

0 Kudos