Right now, to add an icon image to a MGLSymbolStyleAnnotation one needs to load the image from the relevant location and then use the setImage API to add it to the map style.
Since this library is all about making things easier for developers, I think it would be a good idea to do this on behalf of the developer. Perhaps MGLSymbolStyleAnnotation.iconImageName can do this behind the scenes? Here's an idea:
let symbol = MGLSymbolStyleAnnotation(coordinate: coordinate)
let customImage = UIImage(named: "custom")!
symbol.iconImageName("my-custom-image", for image: customImage)
symbol.iconImageName(customImage)
// maybe the true icon image name can be a string version
// of the image name if one isn't specified?
Right now, to add an icon image to a
MGLSymbolStyleAnnotation
one needs to load the image from the relevant location and then use thesetImage
API to add it to the map style.Since this library is all about making things easier for developers, I think it would be a good idea to do this on behalf of the developer. Perhaps
MGLSymbolStyleAnnotation.iconImageName
can do this behind the scenes? Here's an idea: