I am using AGSPictureMarkerSymbol to show marker with image. I want to add the text above the image marker. Is there any way to achieve this?
You can use an AGSCompositeSymbol for this purpose, to combine an image symbol and a text symbol. Below is an example to overlay an index number on top of a blue marker image.
let markerImage = UIImage(named: "BlueMarker")!
let markerSymbol = AGSPictureMarkerSymbol(image: markerImage)
markerSymbol.offsetY = markerImage.size.height / 2
let textSymbol = AGSTextSymbol(text: "1", color: .white, size: 20, horizontalAlignment: .center, verticalAlignment: .middle)
textSymbol.offsetY = markerSymbol.offsetY
let compositeSymbol = AGSCompositeSymbol(symbols: [markerSymbol, textSymbol])