我们正在尝试使用适用于iOS的新版Google Maps API,我们需要能够添加类似于MKOverlay在Apple MapKit中所做的叠加层。
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.