Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let topLeft: CLLocationCoordinate2D = mapView.projection.visibleRegion().farLeft
- let bottomLeft: CLLocationCoordinate2D = mapView.projection.visibleRegion().nearLeft
- let lat = Double(fabs(Float(topLeft.latitude - bottomLeft.latitude)))
- let metersPerPixel: Double = Double((cos(lat * .pi / 180) * 2 * .pi) * 6378137 / Double((256 * pow(2, zoom))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement