I have an application where I want the google maps markers to display my own custom icon, named mapIcon.png.
However, when I run my app, I get this - there's no smaller white icon in the center. I'm really confused about why it appears like this, considering that's not even the color of my icon, and I'm not using .tintColor. (I am using a larger size of icon, which I think is why it's appearing so large).
My code looks like this, which I found by referring to both Google's documentation and answers on here:
let mapIcon = UIImage(named: "mapIcon")!.withRenderingMode(.alwaysTemplate)
let markerView = UIImageView(image: mapIcon)
// Creates a marker in the center of the map.
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.20)
marker.iconView = markerView
How can I get my app to show my marker properly?