1
我們正在嘗試用於iOS的新Google Maps API,並且我們需要能夠添加類似於MKOverlay在Apple的MapKit中所做的疊加層。是否可以在Google Map API中添加與MKOverlay類似的Google Map API?
我們正在嘗試用於iOS的新Google Maps API,並且我們需要能夠添加類似於MKOverlay在Apple的MapKit中所做的疊加層。是否可以在Google Map API中添加與MKOverlay類似的Google Map API?
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