Create map marker with Label

979
1
09-24-2021 11:11 AM
jh9
by
New Contributor II

Hi all - I'm looking to create a point (will be svg) on a map with a label on it. I attached a photo of the intended result. However, I'm using a graphics layer to render the current symbol. If graphics layers do not support label making, how would you go about creating a marker point and label on the same layer? 

Also, is it possible to layer text on top of markers? such as the number 1 on the maker in the screenshot. 

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

You could use a TextSymbol to add a label. Here is an example of doing that (but with Esri Icon instead of a svg): https://codepen.io/noash/pen/PojXoRW?editors=1000

Another good option would be to use CIMSymbol. Here is a sample that uses both CIM and labels to create high quality features: https://developers.arcgis.com/javascript/latest/sample-code/cim-symbols/