Created
September 3, 2018 02:12
-
-
Save rockarts/80a59b2fcb9a935c425ae1444b0b135f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Handle single taps | |
| @objc @IBAction func handleMapTap(sender: UITapGestureRecognizer) { | |
| let point = sender.location(in: sender.view!) | |
| let coordinate = mapView.convert(point, toCoordinateFrom: mapView) | |
| points.append(coordinate) | |
| let annotation = MGLPointAnnotation() | |
| annotation.coordinate = coordinate | |
| mapView.addAnnotation(annotation) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment