Select to view content in your preferred language

FeatureLayer Polylines Label placement for Lines

1550
5
Jump to solution
09-24-2021 04:12 PM
JoshKlaus333
New Contributor

I see in the documentation a Known Limitation placement of labels on polylines.

labelPlacement :  

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#la...

Known Limitation:

  • FeatureLayer Polylines only support center-along label placement in 2D MapViews.

Has anyone found a work around for this or am I stuck labeling along the center of my polylines? Ideally I would like to have the option to label above the line or best case perpendicular above as in ArcGIS Pro.

Thanks,

Josh

 

 

0 Kudos
1 Solution

Accepted Solutions
mgeorge
Esri Contributor

Hi Josh, unfortunately our line placement options for labels are a bit lacking at the moment -- it's something we've been wanting to address for a while, and I'm hoping we can get to it next release (4.22) or 4.23 at the latest. 

Near-term at a bare minimum we'd like to add support for controlling the spacing between line labels, improving line label collision detection, and add above/below & options for curved/uncurved. 

View solution in original post

0 Kudos
5 Replies
mgeorge
Esri Contributor

Hi Josh, unfortunately our line placement options for labels are a bit lacking at the moment -- it's something we've been wanting to address for a while, and I'm hoping we can get to it next release (4.22) or 4.23 at the latest. 

Near-term at a bare minimum we'd like to add support for controlling the spacing between line labels, improving line label collision detection, and add above/below & options for curved/uncurved. 

0 Kudos
JoshKlaus333
New Contributor

Thanks for the quick response. I will look forward to the update in a future release.

0 Kudos
LeonAus
Regular Contributor

It seems this limitation is still in place, are there any plans to add the bare minimum functionality in a specific release?

0 Kudos
mgeorge
Esri Contributor

@LeonAus in 4.22 we added support for repeatLabel, repeatLabelDistance, allowOverrun, and labelPosition (curve / uncurved). We still don't yet have support for all the different labelPlacement options for polylines yet, but we did get some new people on the team recently, so I'm hoping we'll be able to make more progress in labeling soon! Not specific to lines, but better label centroid placement is something we're working on for next release (4.28).

David_Brooks
MVP Regular Contributor

@JoshKlaus333 one solution in the near term is to publish a vector tile cache from ArcGIS pro. This method supports advanced labelling and you still have queryable features, which are actually better performing, dependent on your needs of course


David
..Maps with no limits..
0 Kudos