CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

SRGridLocation 1.0.0

SRGridLocation 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Sebastian Rehnby.



  • By
  • Sebastian Rehnby

SRGridLocation provides a convenient way to convert between Swedish grid and GPS location coordinates.

Usage

Manual

Manually copy the source files in the SRGridLocation directory into your project.

Usage

You can include SRGridLocation anywhere by adding the following line at the top of your source file:

#import <SRGridLocation/SRGridLocation.h>

Then, use the following methods to convert between coordinate types:

SRGridLocationCoordinate SRGridLocationCoordinateMake(SRGridLocationPosition x, SRGridLocationPosition y, SRGridLocationProjection projection)
SRGridLocationCoordinate SRGridLocationCoordinateFromCLLocationCoordinate2D(CLLocationCoordinate2D coordinate, SRGridLocationProjection projection)
CLLocationCoordinate2D CLLocationCoordinate2DFromSRGridLocationCoordinate(SRGridLocationCoordinate coordinate)

There is also a convenience category for CLLocation to create one based on a grid coordinate. To include it:

#import <SRGridLocation/CLLocation+SRGridLocation.h>

Then use it like:

CLLocation *location = [CLLocation sr_locationWithX:6167342 y:1323289];