【发布时间】:2020-02-25 20:11:46
【问题描述】:
我正在开发应用程序,该应用程序会显示用户位置并加载附近的地点。地点是通过坐标从服务器获取的。所以我的问题是如何将它们显示为具有正确大小的自定义标记?我正在将坐标加载到数组中,然后在地图上显示它们。这是我已经走了多远:
标记在滚动时变大。
这是我设置标记的地方:
let coordinates = spotCoordinates
let image = UIImage(named: "Dog")!.withRenderingMode(.alwaysTemplate)
for coord in coordinates {
let position = CLLocationCoordinate2D(latitude: coord.latitude,longitude:coord.longitude)
let marker = GMSMarker(position: position)
marker.map = spotsParentView.mapView
marker.icon = image
}
【问题讨论】:
标签: ios swift google-maps google-maps-markers