BaiduMap_IOSSDK_v6.5.9_Docs
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#import <UIKit/UIKit.h>
12
13#ifndef BMKType_h
14#define BMKType_h
16typedef enum {
17 BMKMapModuleTile = 0,
18 BMKMapModuleBasic
19} BMKMapModule;
20
22typedef enum {
23 BMKWeatherServerTypeDefault = 0,
24 BMKLanguageServerTypeAbroad
25} BMKWeatherServerType;
26
28typedef enum {
29 BMKLanguageTypeChinese = 0,
30 BMKLanguageTypeEnglish
31} BMKLanguageType;
32
34typedef enum {
35 BMKWeatherDataTypeNow = 0,
36 BMKWeatherDataTypeForecasts,
37 BMKWeatherDataTypeForecastsForHour,
38 BMKWeatherDataTypeLifeIndex,
39 BMKWeatherDataTypeAlert,
40 BMKWeatherDataTypeAll
41} BMKWeatherDataType;
42
44typedef NS_ENUM(NSUInteger, BMKEncodePointType) {
45 BMKEncodePointTypeNone = 0,
46 BMKEncodePointTypeBuildInfo
47};
48
53typedef NS_ENUM(NSUInteger, BMK_COORD_TYPE) {
54 BMK_COORDTYPE_GPS = 0,
55 BMK_COORDTYPE_COMMON,
56 BMK_COORDTYPE_BD09LL,
57};
58
63typedef NS_ENUM(NSUInteger, BMKMapType) {
64 BMKMapTypeNone = 0,
65 BMKMapTypeStandard = 1,
66 BMKMapTypeSatellite = 2,
67};
68
69
70typedef enum {
71 BMKErrorOk = 0,
72 BMKErrorConnect = 2,
73 BMKErrorData = 3,
74 BMKErrorRouteAddr = 4,
75 BMKErrorResultNotFound = 100,
76 BMKErrorLocationFailed = 200,
77 BMKErrorPermissionCheckFailure = 300,
78 BMKErrorParse = 310
79}BMKErrorCode;
80
84typedef enum {
85 E_PERMISSIONCHECK_CONNECT_ERROR = -300,
86 E_PERMISSIONCHECK_DATA_ERROR = -200,
87 E_PERMISSIONCHECK_OK = 0,
88 E_PERMISSIONCHECK_KEY_ERROR = 101,
89 E_PERMISSIONCHECK_MCODE_ERROR = 102,
90 E_PERMISSIONCHECK_UID_KEY_ERROR = 200,
91 E_PERMISSIONCHECK_KEY_FORBIDEN = 201,
92 E_PERMISSIONCHECK_KEY_DENY_BY_SERVER = 202,
93 E_PERMISSIONCHECK_USER_DENY_BY_SERVER = 252
94}BMKPermissionCheckResultCode;
95
97typedef enum {
98 BMK_SEARCH_NO_ERROR = 0,
99 BMK_SEARCH_AMBIGUOUS_KEYWORD,
100 BMK_SEARCH_AMBIGUOUS_ROURE_ADDR,
101 BMK_SEARCH_NOT_SUPPORT_BUS,
102 BMK_SEARCH_NOT_SUPPORT_BUS_2CITY = 4,
103 BMK_SEARCH_RESULT_NOT_FOUND,
104 BMK_SEARCH_ST_EN_TOO_NEAR,
105 BMK_SEARCH_KEY_ERROR,
106 BMK_SEARCH_NETWOKR_ERROR,
107 BMK_SEARCH_NETWOKR_TIMEOUT = 9,
108 BMK_SEARCH_PERMISSION_UNFINISHED,
109 BMK_SEARCH_INDOOR_ID_ERROR,
110 BMK_SEARCH_FLOOR_ERROR,
111 BMK_SEARCH_INDOOR_ROUTE_NO_IN_BUILDING,
112 BMK_SEARCH_INDOOR_ROUTE_NO_IN_SAME_BUILDING = 14,
113 BMK_SEARCH_PARAMETER_ERROR,
114 BMK_SEARCH_SERVER_ERROR,
115 BMK_SEARCH_SERVER_NO_PERMISSIONS,
116 BMK_SEARCH_SERVER_NO_ADVANCED_PERMISSIONS,
117 BMK_SEARCH_SERVER_DISTRICT_NO_DATA = 19,
118 BMK_SEARCH_SERVER_DISTRICT_ID_ERROR
119}BMKSearchErrorCode;
120
122typedef enum {
123 BMK_OPEN_NO_ERROR = 0,
124 BMK_OPEN_WEB_MAP,
125 BMK_OPEN_OPTION_NULL,
126 BMK_OPEN_NOT_SUPPORT,
127 BMK_OPEN_POI_DETAIL_UID_NULL = 4,
128 BMK_OPEN_POI_NEARBY_KEYWORD_NULL,
129 BMK_OPEN_ROUTE_START_ERROR,
130 BMK_OPEN_ROUTE_END_ERROR,
131 BMK_OPEN_PANORAMA_UID_ERROR,
132 BMK_OPEN_PANORAMA_ABSENT = 9,
133 BMK_OPEN_PERMISSION_UNFINISHED,
134 BMK_OPEN_KEY_ERROR,
135 BMK_OPEN_NETWOKR_ERROR
136}BMKOpenErrorCode;
137
139typedef struct BMKCoordinateSpan {
140 CLLocationDegrees latitudeDelta;
141 CLLocationDegrees longitudeDelta;
143
144
149UIKIT_STATIC_INLINE BMKCoordinateSpan BMKCoordinateSpanMake(CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta) {
151 span.latitudeDelta = latitudeDelta;
152 span.longitudeDelta = longitudeDelta;
153 return span;
154}
155
157typedef struct BMKCoordinateBounds {
158 CLLocationCoordinate2D northEast;
159 CLLocationCoordinate2D southWest;
161
162
164typedef struct BMKCoordinateRegion {
165 CLLocationCoordinate2D center;
168
173UIKIT_STATIC_INLINE BMKCoordinateRegion BMKCoordinateRegionMake(CLLocationCoordinate2D centerCoordinate, BMKCoordinateSpan span) {
174 BMKCoordinateRegion region;
175 region.center = centerCoordinate;
176 region.span = span;
177 return region;
178}
179
181typedef struct BMKGeoPoint {
185
187typedef struct BMKMapPoint {
188 double x;
189 double y;
191
196UIKIT_STATIC_INLINE BMKMapPoint BMKMapPointMake(double x, double y) {
197 return (BMKMapPoint){x, y};
198}
199
201typedef struct BMKMapPoint3 {
202 double x;
203 double y;
204 double z;
206
212UIKIT_STATIC_INLINE BMKMapPoint3 BMKMapPoint3Make(double x, double y, double z) {
213 return (BMKMapPoint3){x, y, z};
214}
215
217typedef struct BMKMapSize {
218 double width;
219 double height;
220} BMKMapSize;
221
226UIKIT_STATIC_INLINE BMKMapSize BMKMapSizeMake(double width, double height) {
227 return (BMKMapSize){width, height};
228}
229
231typedef struct BMKMapRect {
232 BMKMapPoint origin;
234} BMKMapRect;
235
242UIKIT_STATIC_INLINE BMKMapRect BMKMapRectMake(double x, double y, double width, double height) {
243 return (BMKMapRect){ BMKMapPointMake(x, y), BMKMapSizeMake(width, height)};
244}
245
249UIKIT_STATIC_INLINE BOOL BMKMapRectIsNull(BMKMapRect rect) {
250 return isinf(rect.origin.x) || isinf(rect.origin.y);
251}
252
256UIKIT_STATIC_INLINE double BMKMapRectGetMinX(BMKMapRect rect) {
257 return rect.origin.x;
258}
259
263UIKIT_STATIC_INLINE double BMKMapRectGetMinY(BMKMapRect rect) {
264 return rect.origin.y;
265}
266
270UIKIT_STATIC_INLINE double BMKMapRectGetMidX(BMKMapRect rect) {
271 return rect.origin.x + rect.size.width / 2.0;
272}
273
277UIKIT_STATIC_INLINE double BMKMapRectGetMidY(BMKMapRect rect) {
278 return rect.origin.y + rect.size.height / 2.0;
279}
280
284UIKIT_STATIC_INLINE double BMKMapRectGetMaxX(BMKMapRect rect) {
285 return rect.origin.x + rect.size.width;
286}
287
291UIKIT_STATIC_INLINE double BMKMapRectGetMaxY(BMKMapRect rect) {
292 return rect.origin.y + rect.size.height;
293}
294
296typedef CGFloat BMKZoomScale;
297
299UIKIT_EXTERN const BMKMapSize BMKMapSizeWorld;
301UIKIT_EXTERN const BMKMapRect BMKMapRectWorld;
303UIKIT_EXTERN const BMKMapRect BMKMapRectNull;
304
306@interface BMKPlanNode : NSObject
307
309@property (nonatomic, copy) NSString *cityName;
310
312@property (nonatomic, assign) NSInteger cityID;
313
315@property (nonatomic, copy) NSString *name;
316
318@property (nonatomic, assign) CLLocationCoordinate2D pt;
319
320@end
321
323@interface BMKIndoorPlanNode : NSObject
324
326@property (nonatomic, copy) NSString *floor;
327
329@property (nonatomic, assign) CLLocationCoordinate2D pt;
330
331@end
332
334@interface BMKAddressComponent : NSObject
335
337@property (nonatomic, copy) NSString *country;
338
340@property (nonatomic, copy) NSString *province;
341
343@property (nonatomic, copy) NSString *city;
344
346@property (nonatomic, copy) NSString *district;
347
349@property (nonatomic, copy) NSString *town;
350
352@property (nonatomic, copy) NSString *streetName;
353
355@property (nonatomic, copy) NSString *streetNumber;
356
358@property (nonatomic, copy) NSString *adCode;
359
361@property (nonatomic, copy) NSString *countryCode;
362
364@property (nonatomic, copy) NSString *countryCodeISO;
365
367@property (nonatomic, copy) NSString *countryCodeISO2;
368
370@property (nonatomic, copy) NSString *townCode;
371
375@property (nonatomic, copy) NSString *cityLevel;
376
378@property (nonatomic, copy) NSString *direction;
379
381@property (nonatomic, copy) NSString *distance;
382
383@end
384
385#pragma mark - 底图建筑物信息
386
387@interface BMKBuildInfo : NSObject <NSCopying>
388
390@property (nonatomic, copy, readonly) NSString *struct_id;
391
393@property (nonatomic, assign, readonly) float height;
394
396@property (nonatomic, assign, readonly) int accuracy;
397
399@property (nonatomic, assign, readonly) int label;
400
402@property (nonatomic, copy, readonly) NSString *paths;
403
405@property (nonatomic, assign, readonly) CLLocationCoordinate2D center;
406
407@end
408#endif
此类表示地址结果的层次化信息
Definition: BMKTypes.h:335
Definition: BMKTypes.h:387
室内路线检索节点信息
Definition: BMKTypes.h:324
线路检索节点信息,一个路线检索节点可以通过经纬度坐标或城市名加地名确定
Definition: BMKTypes.h:307
NSInteger cityID
节点所在城市ID
Definition: BMKTypes.h:312
CLLocationCoordinate2D pt
节点坐标
Definition: BMKTypes.h:318
NSString * cityName
节点所在城市
Definition: BMKTypes.h:309
NSString * name
节点名称
Definition: BMKTypes.h:315
表示一个经纬度区域
Definition: BMKTypes.h:157
CLLocationCoordinate2D southWest
东北角点经纬度坐标
Definition: BMKTypes.h:159
表示一个经纬度区域
Definition: BMKTypes.h:164
BMKCoordinateSpan span
中心点经纬度坐标
Definition: BMKTypes.h:166
表示一个经纬度范围
Definition: BMKTypes.h:139
CLLocationDegrees latitudeDelta
纬度范围
Definition: BMKTypes.h:140
CLLocationDegrees longitudeDelta
经度范围
Definition: BMKTypes.h:141
表示一个经纬度坐标点
Definition: BMKTypes.h:181
int longitudeE6
经度,乘以1e6之后的值
Definition: BMKTypes.h:183
int latitudeE6
纬度,乘以1e6之后的值
Definition: BMKTypes.h:182
三维地理坐标点,用空间坐标表示
Definition: BMKTypes.h:201
double z
纵坐标
Definition: BMKTypes.h:204
double y
横坐标
Definition: BMKTypes.h:203
地理坐标点,用直角地理坐标表示
Definition: BMKTypes.h:187
double y
横坐标
Definition: BMKTypes.h:189
矩形,用直角地理坐标表示
Definition: BMKTypes.h:231
BMKMapSize size
屏幕左上点对应的直角地理坐标
Definition: BMKTypes.h:233
矩形大小,用直角地理坐标表示
Definition: BMKTypes.h:217
double height
宽度
Definition: BMKTypes.h:219