Select to view content in your preferred language

Has anyone worked out a way to draw Labels with a background color/border for FeatureLayers?

401
2
06-09-2022 09:19 AM
LukeCalladine
Occasional Contributor

Hey everyone,

I'm wondering if anyone has worked out a way to draw Labels for FeatureLayers that simulates the MapImageLayer backgroundcolor TextSymbol property as in this example: https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-dynamic-labels/

For more context, below is an example of what I currently have and what I'm trying to achieve.

LukeCalladine_3-1654790285835.png

Cheers,

Luke

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @LukeCalladine, we are considering adding this functionality for FeatureLayer labels at a future release. You could consider using CIM for this functionality as well, but it's a quite different workflow: https://developers.arcgis.com/javascript/latest/sample-code/?tagged=CIMSymbol

 

BryanMc
Frequent Contributor

This is now possible in 4.26. TextSymbols can have backgrounds and borders: Release notes for 4.26 | Overview | ArcGIS Maps SDK for JavaScript 4.26 | ArcGIS Developers