错误:
value of type GMSmarker has no member iconView
如何使用 iconView?
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: 13.7990609, longitude: 100.5494513)
marker.title = "Coffee Factory"
marker.snippet = "Chatuchak"
marker.iconView = imageView
marker.map = mapView
最佳答案
确保您使用的是最新的 Google Maps SDK v2.3.0 及更高版本。
试试这个:
marker.icon = UIImage(named: "<Your Image>")
编辑:
或者您可以将UIImageView
设置为iconView
marker.iconView = UIImageView(image: UIImage(named: "<Your Image>"))
输出:
希望有帮助。
关于ios - Google map GMSMaker iconView - iOS SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44361534/