【发布时间】:2019-08-26 17:44:07
【问题描述】:
我想要的是我想将标记位置固定到我的地图视图的中心。当地图仍然移动时,我的标记应该粘在那个中心点上。 标记代码如下:
var pin:GMSMarker = GMSMarker(position: CLLocationCoordinate2DMake(currentLocation.coordinate.latitude, currentLocation.coordinate.longitude))
pin.icon = UIImage(named: "img_map_pin")
pin.map = mapView?
pin.infoWindowAnchor = CGPointMake(0.44, 0.44)
mapView?.selectedMarker = pin
我想和 Uber 一样。当地图移动标记位于中心并且地图停止移动后,我从地图中获取该点的地址。
【问题讨论】:
标签: ios google-maps swift