JS API 4.21: Trying to create a TextSymbol for a Graphic in a GraphicsLayer (or the MapView.graphics) that has a background and/or a border, neither of which seem to work.
Basic sample: https://jsbin.com/qurexuh/edit?html,output
TextSymbol doc indicates there are supported properties:
- backgroundColor
- borderLineColor
- borderLineSize
Halo works, but setting these values seems to have no effect. Can't find anything on it, am I missing something?
Thx!
Solved! Go to Solution.
Hi @TVlasschaert, unfortunately, those properties are documented as only working when using TextSymbol with a MapImageLayer:
Down the road, we do plan on making some enhancements in this area to make those properties useful in other scenarios, like your use case.
Hi @TVlasschaert, unfortunately, those properties are documented as only working when using TextSymbol with a MapImageLayer:
Down the road, we do plan on making some enhancements in this area to make those properties useful in other scenarios, like your use case.
Ah I see now. Shoot - but thx.
Yeah, I hear you. Feel free to mark my answer as the solution if you feel so inclined.
Hi!
I've found a nice workaround for the backgroundColor issue:
You can use the haloColor and the haloSize properties as backgroundColor.
Just set the color you want and set the haloSize the same as the size of the Text.