Some utility methods for Core Location
Objective-C
Latest commit 21468d9 Aug 11, 2015 @fernandospr Merge pull request #1 from AmitaiB/master
Adds a convenience init with just 2Dcoord
Permalink
Failed to load latest commit information.
CLLocationUtils
CLLocationUtilsProject.xcodeproj
CLLocationUtilsProject
CLLocationUtilsTests
.gitignore
LICENSE
README.md

README.md

Click here to lend your support to: Fernando's Open Source Projects and make a donation at pledgie.com !

CoreLocationUtils

A category with convenient methods for CLLocation, based on http://www.movable-type.co.uk/scripts/latlong.html

Features

  • Convenient CLLocation initializers:
    • initialize with latitude and longitude in radians
    • initialize with a pretty string format (e.g. latitude = @"34° 36' 12\" N" longitude = @"35° 12' 24\" W")
  • Obtain coordinates in a pretty format
  • Distance between coordinates using:
    • Haversine formula
    • Spherical Law of cosines formula
    • Pythagoras formula
    • Rhumb line formula
  • Midpoint along a great circle path between coordinates
  • Initial/final bearings to target location from source location
  • Calculate target location with a given distance and bearing from source location

Usage

Copy CLLocationUtils to your project, include CLLocation+Utils.h and start using!

Please check CLLocationUtilsTests for examples.