Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created January 26, 2017 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save here-devblog-gists/c103eb25c139f4219938c9405cd83c3d to your computer and use it in GitHub Desktop.
Save here-devblog-gists/c103eb25c139f4219938c9405cd83c3d to your computer and use it in GitHub Desktop.
func mapView(_ mapView: NMAMapView!, didReceiveLongPressAtLocation location: CGPoint) {
map = mapView
if NMAPositioningManager.shared().currentPosition != nil && NMAPositioningManager.shared().currentPosition.isValid {
calculateRoute(from: NMAPositioningManager.shared().currentPosition.coordinates, to: mapView.geoCoordinates(from: location))
} else {
print("No valid startposition found")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment