gpt4 book ai didi

ios - Google map GMSMaker iconView - iOS SDK

转载 作者:行者123 更新时间:2023-11-30 12:24:32 31 4
gpt4 key购买 nike

错误:

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

Value of type GMSmarker has no member iconView

最佳答案

确保您使用的是最新的 Google Maps SDK v2.3.0 及更高版本。

试试这个:

    marker.icon = UIImage(named: "<Your Image>")

编辑:

或者您可以将UIImageView设置为iconView

    marker.iconView = UIImageView(image: UIImage(named: "<Your Image>"))

输出:

Screen shot

希望有帮助。

关于ios - Google map GMSMaker iconView - iOS SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44361534/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com