Latest 1.0.0
Homepage https://github.com/sebreh/SRGridLocation
License MIT
Platforms ios 5.0, requires ARC
Frameworks CoreLocation
Authors

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

Installation

CocoaPods

Add the following line to your Podfile:

pod 'SRGridLocation'

And run:

pod install

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];

Latest podspec

{
    "name": "SRGridLocation",
    "version": "1.0.0",
    "summary": "SRGridLocation provides a convenient way to convert between Swedish grid and GPS location coordinates.",
    "homepage": "https://github.com/sebreh/SRGridLocation",
    "license": "MIT",
    "authors": {
        "Sebastian Rehnby": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sebreh/SRGridLocation.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "SRGridLocation/**/*.{h,m}",
    "frameworks": "CoreLocation",
    "requires_arc": true
}

Pin It on Pinterest

Share This