Map Viewer Polygon Label centroid

2366
9
08-24-2021 10:47 AM
JayJohnsonWashoeCounty
Occasional Contributor III

Polygon labeling in the new Map Viewer is causing me issues.  It appears that my polygon labels are being placed on the polygon centroid, which in some cases is OUTSIDE the polygon.  This does not happen in Map Viewer Classic.  

Is there a setting somewhere or some workaround for this?

Jay
Washoe County GIS
Tags (3)
9 Replies
jcarlson
MVP Esteemed Contributor

In the old map viewer, your labels get created as a LabelLayer:

jcarlson_0-1629827908238.png

Within that object, each label is separately defined with their own x/y coordinates.

In the JS 4.x API, there does not appear to be a LabelLayer object, but there are instead LabelClass objects. Oddly, they both seem to have the same placement properties.

I'm a little out of my depth on some of this JS stuff. It's not totally clear to me what the JS 3.x viewer was doing under the hood to calculate the particular placement of the individual labels. I'd guess that the way the new viewer sort of loads features as "tiles" has something to do with it. Line labeling in the new viewer is kind of goofy for that reason, with line labels being repeated across the "tiles".

- Josh Carlson
Kendall County GIS
Teresa_Blader
Occasional Contributor III

I am also having this issue. Highlighted is polygon number 7, green is number 4, however the 4 is clearly placed within the purple seven boundaries. This is not helpful and doesn't actually change when I zoom in.

Teresa_Blader_0-1633982454474.png

 

Teresa Blader
Olmsted County GIS Specialist
JimW
by
Occasional Contributor II

I am experiencing a similar issue.  The polygon label appears to be locked on to the centroid.  The only way for someone to see the polygon label is if they zoom in on the polygon centroid.  If the centroid is outside of their current map view, they will not see it.

TanGnar
Occasional Contributor

I would especially love to see functionality like in desktop, where the polygon label is 'follows' the map view, instead of being locked to centroid. 

ScottBollhoefer
New Contributor

I'm currently dealing with this exact problem. It makes the New Map Viewer unreliable & unsuitable for any map that needs to have a labeled polygon. Is there still no solution for this aside from switching my maps to the Classic Map Viewer?

GregHeintz1
New Contributor III

Yes.  I am having a similar problem with polygon labels.  When I create labels for two different fields in a polygon feature class and then go to create an export PDF file, it will not show the second label.  It appears in the Map Viewer map display but when the export PDF file is created it only shows one label.  Even if I offset the X and Y locations for the two different labels, they still don't appear.

KaraUtter
Occasional Contributor III

The labels being placed for the centroid places them outside of the actual polygon and users will not understand this. They will assume labels are incorrect, or that a feature is something that it is not. For example, the below CF label needs to be in the shape that has red fill but no hash marks. I can't use the labels because there are a few of these that are making the map appear incorrect. This is a real bummer.

KaraUtter_0-1652219385130.png

 

MariaGiarrusso
New Contributor III

Having same issue. It is a real show-stopper for moving to the new Map Viewer for some applications that rely on polygon labelling. Just submitted an idea.  "Label Polygons Beyond the Centroid in New Map Viewer".  Maybe this can get some attention if we get a few thumbs up.  Thanks

TannerRollin
New Contributor II

Keeping this thread alive. Frustrating to not have any labeling options for polygons beyond font. Not very useful.

0 Kudos