Hello @amaan.makhani ,
After futher research, SetBackground will not work because it will take any spaces into account.
- This is more complicated but you can call ComputeTextExtent to get the text size (w/o padding) and insert your own background.
This background will be render in 3D space. If your text is 2D, then you will need to recalculate your background.
Below is a simple sample on ComputeTextExtent
HPS - ComputeTextExtent example
-
You can insert your text with a offset to your symbol/marker.
HPS have a option to add a leader line to your text box so your text does not have to be the same position as your symbol.
Please see documentation below for sample.
Best Regards,
Simon