For the mapView, I create it by self.view.addSubview(mapView!)
, so I guess that's why I can't override the touchesBegan function to detect the touch point. There is a function called didLongPressAtCoordinate
in mapView delegate, but it only contains coordinates and mapView as argument.
func mapView(mapView: GMSMapView, didLongPressAtCoordinate coordinate: CLLocationCoordinate2D) {
}
Any suggestions?
Thanks.