Hey guys I’m working on some web maps for my org and am wondering if there’s a good way to have labels move with the map as the user zooms in!
I’m creating generic esri web maps with a large polygon symbolized by different zones.
I’d like for when the user is zoomed in on the web map that a label is ALWAYS on their screen regardless of the current zoom level or location
My idea is to make it as easy as possible for someone to be anywhere in the map and it still be clear what portion of the map they’re looking at without having to memorize a color!
Thanks in advance!!
This should be the standard behavior if you are using a Map Service/Map Image Layer. You will also want to make sure it has been published with a Feature Service as well to get the full benefits in Experience Builder. I really tried looking for a better explanation of these concepts, but unfortunately you are stuck with mine.
A quick primer for those who may not be familiar with the difference between Feature Layers and Map Image Layers. Feature Layers render client-side and transmit all their data to the end users computer which allows for Experience Builder to do stuff with it. Map Image Layer render server-side. The power of server-side rendering makes Map Image Layers faster in most circumstances. It also allows for more complex symbology and labels. The server-side labeling engine will also dynamically reposition labels as the end user moves around the map which is super useful for big polygons and long polylines. If you're not sure what kind of layer you have, a quick test is to look at the end of the URL. If you see MapServer, it's probably a Map Image Layer. If it ends in a number, it's probably a Feature Layer.
Maybe I'm misunderstanding, but this seems like conflicting functionality. It seems to say labels should be visible at all levels, which is easy to do, if maybe not the greatest UI decision.
I’d like for when the user is zoomed in on the web map that a label is ALWAYS on their screen regardless of the current zoom level or location
I would also like to see that. What happens is polygons only labeling option is to put them in the middle (or centroid I suppose) of the polygon. So then when you zoom in and that central point is no long visible, you cannot see the label. I have tried to find work arounds for years but haven't been sucessful.
Have you tried creating a layer of point centroids for the polygons that keeps the label field from the polygon? Set the label to the centroid and the point transparency to 100%. That way the label is tied to the point, not the actual polygon.
Annotation may be another option. Just make sure the annotation isn't tied to the feature layer.
If you have access to Pro: find the map file you publish the layers from, select a layer, go to the "Labeling" tab in the ribbon, click the tiny arrow in the bottom-right corner of the "Label Placement" section: now you have the Maplex positioning options. Click the third icon from the left to go to the conflict options and set a "Repeat". This will saturate your polygon with labels, even if the centroid is offscreen. This requires overwriting the map service or publishing a new one, and I'm pretty sure this won't work with your Feature Service (it might work with a vector tile service?) but it'll give you all the labels you could ever need.
That said, as others have mentioned: this is what symbology is for. A well-authored set of polygon symbols will make your areas easy to delineate and will work in all types of service. If the user has trouble remembering each symbol they can open the legend built into every web map.