daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Mar 20th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let topLeft: CLLocationCoordinate2D = mapView.projection.visibleRegion().farLeft
  2. let bottomLeft: CLLocationCoordinate2D = mapView.projection.visibleRegion().nearLeft
  3. let lat = Double(fabs(Float(topLeft.latitude - bottomLeft.latitude)))
  4. let metersPerPixel: Double = Double((cos(lat * .pi / 180) * 2 * .pi) * 6378137 / Double((256 * pow(2, zoom))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top