Skip to content

Instantly share code, notes, and snippets.

@ezefranca
Forked from marmelroy/MKMapCameraAltitude
Created February 13, 2019 08:53
Show Gist options
  • Save ezefranca/6686afeaf5798b5c6bae939c93fd1207 to your computer and use it in GitHub Desktop.
Save ezefranca/6686afeaf5798b5c6bae939c93fd1207 to your computer and use it in GitHub Desktop.
Calculating MKMapCamera's altitude for a distance
let altitude = distance*tan(M_PI*(75.0/180.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment