Latest 1.0.0
Homepage https://github.com/MyHZ/HZLocationConverter
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit, CoreLocation, Foundation
Authors

Cocoapods支持

pod 'HZLocationConverter'

常见的坐标转换方式

/**
 *  判断是否在中国
 */
+(BOOL)isLocationOutOfChina:(CLLocationCoordinate2D)location;

/**
 *  将WGS-84转为GCJ-02(火星坐标):
 */
+(CLLocationCoordinate2D)transformFromWGSToGCJ:(CLLocationCoordinate2D)wgsLoc;

/**
 *  将GCJ-02(火星坐标)转为WGS-84:
 */
+(CLLocationCoordinate2D)transformFromGCJToWGS:(CLLocationCoordinate2D)p;

/**
 *  将GCJ-02(火星坐标)转为百度坐标:
 */
+(CLLocationCoordinate2D)transformFromGCJToBaidu:(CLLocationCoordinate2D)p;

/**
 *  将百度坐标转为GCJ-02(火星坐标):
 */
+(CLLocationCoordinate2D)transformFromBaiduToGCJ:(CLLocationCoordinate2D)p;

  • 项目地址

https://github.com/MyHZ/HZLocationConverter

  • Demo地址

https://github.com/MyHZ/HZLocationConverterExample

Latest podspec

{
    "name": "HZLocationConverter",
    "version": "1.0.0",
    "summary": "HZLocationConverter .",
    "description": "HZLocationConverter : a util for converter",
    "homepage": "https://github.com/MyHZ/HZLocationConverter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "MyHZ": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/MyHZ/HZLocationConverter.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "HZLocationConverter",
        "Location/HZLocationConverter/*.{h,m}"
    ],
    "frameworks": [
        "UIKit",
        "CoreLocation",
        "Foundation"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This