-
Notifications
You must be signed in to change notification settings - Fork 44
/
TQLocationConverter.h
39 lines (31 loc) · 858 Bytes
/
TQLocationConverter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// TQLocationConverter.h
//
//
// Created by qfu on 9/16/14.
// Copyright (c) 2014 tinyq. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
@interface TQLocationConverter : NSObject
/**
* 判断是否在中国
*/
+(BOOL)isLocationOutOfChina:(CLLocationCoordinate2D)location;
/**
* 将WGS-84转为GCJ-02(火星坐标):
*/
+(CLLocationCoordinate2D)transformFromWGSToGCJ:(CLLocationCoordinate2D)wgsLoc;
/**
* 将GCJ-02(火星坐标)转为百度坐标:
*/
+(CLLocationCoordinate2D)transformFromGCJToBaidu:(CLLocationCoordinate2D)p;
/**
* 将百度坐标转为GCJ-02(火星坐标):
*/
+(CLLocationCoordinate2D)transformFromBaiduToGCJ:(CLLocationCoordinate2D)p;
/**
* 将GCJ-02(火星坐标)转为WGS-84:
*/
+(CLLocationCoordinate2D)transformFromGCJToWGS:(CLLocationCoordinate2D)p;
@end