百度地图SDK for iOS v4.0.0 类参考
BMKTypes.h
1 //
2 // BMKType.h
3 // MapPlatform
4 //
5 // Created by BaiduMapAPI on 13-3-26.
6 // Copyright (c) 2013年 baidu. All rights reserved.
7 //
8 
9 #import <CoreGraphics/CoreGraphics.h>
10 #import <CoreLocation/CoreLocation.h>
11 
12 #import <UIKit/UIKit.h>
13 typedef enum
14 {
15  BMK_COORDTYPE_GPS = 0,
16  BMK_COORDTYPE_COMMON,
17  BMK_COORDTYPE_BD09LL,
18 } BMK_COORD_TYPE;
19 enum {
20  BMKMapTypeNone = 0,
21  BMKMapTypeStandard = 1,
22  BMKMapTypeSatellite = 2,
23 };
24 typedef NSUInteger BMKMapType;
25 
26 typedef enum {
27  BMKErrorOk = 0,
28  BMKErrorConnect = 2,
29  BMKErrorData = 3,
30  BMKErrorRouteAddr = 4,
31  BMKErrorResultNotFound = 100,
32  BMKErrorLocationFailed = 200,
33  BMKErrorPermissionCheckFailure = 300,
34  BMKErrorParse = 310
35 }BMKErrorCode;
36 //鉴权结果状态码
37 typedef enum {
38  E_PERMISSIONCHECK_CONNECT_ERROR = -300,//链接服务器错误
39  E_PERMISSIONCHECK_DATA_ERROR = -200,//服务返回数据异常
40  E_PERMISSIONCHECK_OK = 0, // 授权验证通过
41  E_PERMISSIONCHECK_KEY_ERROR = 101, //ak不存在
42  E_PERMISSIONCHECK_MCODE_ERROR = 102, //mcode签名值不正确
43  E_PERMISSIONCHECK_UID_KEY_ERROR = 200, // APP不存在,AK有误请检查再重试
44  E_PERMISSIONCHECK_KEY_FORBIDEN= 201, // APP被用户自己禁用,请在控制台解禁
45  /*
46  *更多鉴权状态码请参考:
47  *http://developer.baidu.com/map/index.php?title=lbscloud/api/appendix
48  */
49 }BMKPermissionCheckResultCode;
50 //检索结果状态码
51 typedef enum{
52  BMK_SEARCH_NO_ERROR = 0,
53  BMK_SEARCH_AMBIGUOUS_KEYWORD,
54  BMK_SEARCH_AMBIGUOUS_ROURE_ADDR,
55  BMK_SEARCH_NOT_SUPPORT_BUS,
56  BMK_SEARCH_NOT_SUPPORT_BUS_2CITY,
57  BMK_SEARCH_RESULT_NOT_FOUND,
58  BMK_SEARCH_ST_EN_TOO_NEAR,
59  BMK_SEARCH_KEY_ERROR,
60  BMK_SEARCH_NETWOKR_ERROR,
61  BMK_SEARCH_NETWOKR_TIMEOUT,
62  BMK_SEARCH_PERMISSION_UNFINISHED,
63  BMK_SEARCH_INDOOR_ID_ERROR,
64  BMK_SEARCH_FLOOR_ERROR,
65  BMK_SEARCH_INDOOR_ROUTE_NO_IN_BUILDING,
66  BMK_SEARCH_INDOOR_ROUTE_NO_IN_SAME_BUILDING,
67  BMK_SEARCH_PARAMETER_ERROR,
68 }BMKSearchErrorCode;
69 
70 //调起百度地图结果状态码
71 typedef enum{
72  BMK_OPEN_NO_ERROR = 0,
73  BMK_OPEN_WEB_MAP,
74  BMK_OPEN_OPTION_NULL,
75  BMK_OPEN_NOT_SUPPORT,
76  BMK_OPEN_POI_DETAIL_UID_NULL,
77  BMK_OPEN_POI_NEARBY_KEYWORD_NULL,
78  BMK_OPEN_ROUTE_START_ERROR,
79  BMK_OPEN_ROUTE_END_ERROR,
80  BMK_OPEN_PANORAMA_UID_ERROR,
81  BMK_OPEN_PANORAMA_ABSENT,
82  BMK_OPEN_PERMISSION_UNFINISHED,
83  BMK_OPEN_KEY_ERROR,
84  BMK_OPEN_NETWOKR_ERROR,
85 }BMKOpenErrorCode;
86 
88 typedef struct {
89  CLLocationDegrees latitudeDelta;
90  CLLocationDegrees longitudeDelta;
92 
94 typedef struct {
95  CLLocationCoordinate2D northEast;
96  CLLocationCoordinate2D southWest;
98 
100 typedef struct {
101  CLLocationCoordinate2D center;
104 
106 typedef struct {
109 } BMKGeoPoint;
110 
112 typedef struct {
113  double x;
114  double y;
115 } BMKMapPoint;
116 
118 typedef struct {
119  double width;
120  double height;
121 } BMKMapSize;
122 
124 typedef struct {
127 } BMKMapRect;
128 
130 typedef CGFloat BMKZoomScale;
131 
133 UIKIT_EXTERN const BMKMapSize BMKMapSizeWorld;
135 UIKIT_EXTERN const BMKMapRect BMKMapRectWorld;
137 UIKIT_EXTERN const BMKMapRect BMKMapRectNull;
138 
140 @interface BMKPlanNode : NSObject{
141  NSString* _cityName;
142  NSString* _name;
143  CLLocationCoordinate2D _pt;
144 }
145 
147 @property (nonatomic, strong) NSString* cityName;
149 @property (nonatomic, assign) NSInteger cityID;
151 @property (nonatomic, strong) NSString* name;
153 @property (nonatomic) CLLocationCoordinate2D pt;
154 @end
155 
157 @interface BMKIndoorPlanNode : NSObject
158 
160 @property (nonatomic, retain) NSString* floor;
162 @property (nonatomic) CLLocationCoordinate2D pt;
163 
164 @end
165 
167 @interface BMKAddressComponent : NSObject
168 
170 @property (nonatomic, strong) NSString* streetNumber;
172 @property (nonatomic, strong) NSString* streetName;
174 @property (nonatomic, strong) NSString* district;
176 @property (nonatomic, strong) NSString* city;
178 @property (nonatomic, strong) NSString* province;
180 @property (nonatomic, strong) NSString* country;
182 @property (nonatomic, strong) NSString* countryCode;
184 @property (nonatomic, strong) NSString* adCode;
185 
186 @end
double y
纵坐标
Definition: BMKTypes.h:114
BMKCoordinateSpan span
经纬度范围
Definition: BMKTypes.h:102
矩形大小,用直角地理坐标表示
Definition: BMKTypes.h:118
CLLocationCoordinate2D pt
节点坐标
Definition: BMKTypes.h:162
线路检索节点信息,一个路线检索节点可以通过经纬度坐标或城市名加地名确定
Definition: BMKTypes.h:140
CLLocationDegrees latitudeDelta
纬度范围
Definition: BMKTypes.h:89
BMKMapPoint origin
屏幕左上点对应的直角地理坐标
Definition: BMKTypes.h:125
表示一个经纬度坐标点
Definition: BMKTypes.h:106
矩形,用直角地理坐标表示
Definition: BMKTypes.h:124
double x
横坐标
Definition: BMKTypes.h:113
表示一个经纬度区域
Definition: BMKTypes.h:94
NSString * floor
节点所在楼层
Definition: BMKTypes.h:160
室内路线检索节点信息
Definition: BMKTypes.h:157
CLLocationDegrees longitudeDelta
经度范围
Definition: BMKTypes.h:90
CLLocationCoordinate2D northEast
东北角点经纬度坐标
Definition: BMKTypes.h:95
double height
高度
Definition: BMKTypes.h:120
此类表示地址结果的层次化信息
Definition: BMKTypes.h:167
BMKMapSize size
坐标范围
Definition: BMKTypes.h:126
int longitudeE6
经度,乘以1e6之后的值
Definition: BMKTypes.h:108
int latitudeE6
纬度,乘以1e6之后的值
Definition: BMKTypes.h:107
CLLocationCoordinate2D center
中心点经纬度坐标
Definition: BMKTypes.h:101
表示一个经纬度范围
Definition: BMKTypes.h:88
CLLocationCoordinate2D southWest
西南角点经纬度坐标
Definition: BMKTypes.h:96
表示一个经纬度区域
Definition: BMKTypes.h:100
double width
宽度
Definition: BMKTypes.h:119
地理坐标点,用直角地理坐标表示
Definition: BMKTypes.h:112