Skip to content

liuliangju/LJMapCoordinateCorrection

Repository files navigation

LJMapCoordinateCorrection

License MIT  CocoaPods  Support  Platform  Build Status

Features

地图地理坐标的相互转换

Installation

With CocoaPods, add this line to your Podfile.

pod 'LJMapCoordinateCorrection', '~> 1.0.0' 

Manually: Drag all files under LJMapCoordinateCorrection/Classes folder into your project.

Method

// 判断是否在中国:

+ (BOOL)isLocationOutOfChina:(CLLocationCoordinate2D)location

// 将WGS-84转为GCJ-02(火星坐标):

+ (CLLocationCoordinate2D)transformFromWGSToGCJ:(CLLocationCoordinate2D)wgsLoc;

// 将GCJ-02(火星坐标)转为百度坐标:

+ (CLLocationCoordinate2D)transformFromGCJToBaidu:(CLLocationCoordinate2D)gcjLoc;

// 将百度坐标转为GCJ-02(火星坐标):

+ (CLLocationCoordinate2D)transformFromBaiduToGCJ:(CLLocationCoordinate2D)bdLoc;

// 将GCJ-02(火星坐标)转为WGS-84:

+ (CLLocationCoordinate2D)transformFromGCJToWGS:(CLLocationCoordinate2D)gcjLoc;

许可证

LJMapCoordinateCorrection 使用 MIT 许可证,详情见 LICENSE 文件。

About

地图坐标的互相转换

Resources

License

Stars

Watchers

Forks

Packages

No packages published