【问题标题】:How to create custom view of markers in google maps in swift如何在谷歌地图中快速创建标记的自定义视图
【发布时间】:2018-10-07 14:39:47
【问题描述】:

【问题讨论】:

  • 欢迎来到 Stack Overflow!图片不是一个可接受的问题,请提供有关您的问题以及您尝试解决的问题的更多详细信息。

标签: ios swift google-maps swift3 google-maps-markers


【解决方案1】:

这是关于如何添加标记的documentation

具体来说,这几行:

let position = CLLocationCoordinate2D(latitude: 10, longitude: 10)
let marker = GMSMarker(position: position)
marker.title = "Hello World"
marker.icon = GMSMarker.markerImage(with: .black) // or any image here
marker.map = mapView

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-06-26
    • 2014-07-18
    • 1970-01-01
    • 2021-08-07
    • 1970-01-01
    • 1970-01-01
    • 2019-10-29
    • 2013-08-21
    相关资源
    最近更新 更多