Hi I am trying to use CIM Symbols for a point feature, but am having issues with labeling.
When using primitiveOverrides to adjust the symbol size property based on view.scale the labels are really close to the center point of the symbol. Is there any way to specify a larger offset for the label? This is not an issue when I disable the primitiveOverrides.
For reference, this is what "above-center" looks like.
API v4.24
Any feedback or advice would be appreciated.
Solved! Go to Solution.
Hi @LukaB - unfortunately, this is a known issue and something we are working on improving! As a workaround, you could add the label to your CIMSymbol as a CIMTextSymbol in the markerGraphics of the CIMVectorMarker symbol layer, and use primitive overrides to (1) update the textString based on your feature attribute, and (2) adjust the offsetY of your symbol based on the $view.scale. Here's a quick example I just put together to demonstrate this: https://codepen.io/annefitz/pen/ZEqQzgZ?editors=100
Hi @LukaB - unfortunately, this is a known issue and something we are working on improving! As a workaround, you could add the label to your CIMSymbol as a CIMTextSymbol in the markerGraphics of the CIMVectorMarker symbol layer, and use primitive overrides to (1) update the textString based on your feature attribute, and (2) adjust the offsetY of your symbol based on the $view.scale. Here's a quick example I just put together to demonstrate this: https://codepen.io/annefitz/pen/ZEqQzgZ?editors=100
Thank you Anne. Very much appreciate your response, and the provided workaround which may be just what I am looking for.