Latest 0.0.4
Homepage https://github.com/Dwarven/DYLocationConverter
License MIT
Platforms ios 7.0
Dependencies DYCoordinateInChina
Authors

CocoaPods Compatible
Platform
Twitter

A location converter between WGS84 GCJ-02 and BD-09.

Podfile

To integrate DYLocationConverter into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'DYLocationConverter'

How to use

#import "DYLocationConverter.h"

WGS-84 -> GCJ-02

+ (CLLocationCoordinate2D)gcj02FromWgs84:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)gcj02LocationFromWgs84:(CLLocation *)location;

GCJ-02 -> WGS-84

+ (CLLocationCoordinate2D)wgs84FromGcj02:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)wgs84LocationFromGcj02:(CLLocation *)location;

WGS-84 -> BD-09

+ (CLLocationCoordinate2D)bd09FromWgs84:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)bd09LocationFromWgs84:(CLLocation *)location;

BD-09 -> WGS-84

+ (CLLocationCoordinate2D)wgs84FromBd09:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)wgs84LocationFromBd09:(CLLocation *)location;

GCJ-02 -> BD-09

+ (CLLocationCoordinate2D)bd09FromGcj02:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)bd09LocationFromGcj02:(CLLocation *)location;

BD-09 -> GCJ-02

+ (CLLocationCoordinate2D)gcj02FromBd09:(CLLocationCoordinate2D)coordinate;
+ (CLLocation *)gcj02LocationFromBd09:(CLLocation *)location;

Latest podspec

{
    "name": "DYLocationConverter",
    "version": "0.0.4",
    "summary": "A location converter between WGS84 GCJ-02 and BD-09.",
    "homepage": "https://github.com/Dwarven/DYLocationConverter",
    "platforms": {
        "ios": "7.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dwarven": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Dwarven/DYLocationConverter.git",
        "tag": "0.0.4"
    },
    "source_files": "Class/*.{h,m}",
    "ios": {
        "frameworks": [
            "CoreLocation",
            "MapKit"
        ]
    },
    "dependencies": {
        "DYCoordinateInChina": []
    }
}

Pin It on Pinterest

Share This