The following sample shows a great use of the CIMSymbol in the ESRI JS API.
https://developers.arcgis.com/javascript/latest/sample-code/cim-symbols/index.html
Is it possible to set the textString property on the markergraphic to an attribute of the graphic?
https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMSymbols.md#cimmarkergraphic
I'd like to place a number (attribute of the graphic) in the centre of the symbol and have tried "{$feature.numfld}" but this just displays the text string, not the expresssion value.
Solved! Go to Solution.
Hi Tim,
This is not currently possible for CIMSymbol. You could add labels to your FeatureLayer instead of doing it through the CIMSymbol. See this example: Add labels to a FeatureLayer | ArcGIS API for JavaScript 4.15
There's more information available in the API Reference: FeatureLayer.labelingInfo | ArcGIS API for JavaScript 4.15
Let me know if you have any questions. I hope this helps!
Thanks,
Anne
Hi Tim,
This is not currently possible for CIMSymbol. You could add labels to your FeatureLayer instead of doing it through the CIMSymbol. See this example: Add labels to a FeatureLayer | ArcGIS API for JavaScript 4.15
There's more information available in the API Reference: FeatureLayer.labelingInfo | ArcGIS API for JavaScript 4.15
Let me know if you have any questions. I hope this helps!
Thanks,
Anne