我们正在尝试使用适用于iOS的新版谷歌地图API,我们需要能够添加类似于MKOverlay在Apple的MapKit中所做的叠加。
答案 0 :(得分:0)
let poly = GMSMutablePath()
poly .addCoordinate(CLLocationCoordinate2DMake(newLocation.coordinate.latitude, newLocation.coordinate.longitude))
let polygon = GMSPolygon()
polygon .path = poly
polygon.fillColor = UIColor.greenColor()
polygon.strokeWidth = 4
polygon.strokeColor = UIColor .redColor()
polygon.map = self.mapView