Map Doc
1.0
iOS-引擎SDK-开放平台
|
#import <MBUtils.h>
类方法 | |
(NSDictionary *) | + App_getNaviDataMetadata: |
(NSInteger) | + distanceWithStartPoint:endPoint: |
(NSString *) | + distanceTextWithStartPoint:endPoint: |
(NSString *) | + distanceTextWithLength: |
(NSString *) | + orientationTextWithStartPoint:endPoint: |
(NSInteger) | + angleFromDx:andDy: |
(NSInteger) | + angleFromPoint:toPoint: |
(int) | + isNightMode |
(NSString *) | + getAbsolutePath: |
(MBDateTime) | + NSDate2DateTime: |
(NSString *) | + Device_uniqueDeviceIdentifier |
(unsigned char *) | + convertUIImageToBitmapRGBA8: |
(UIImage *) | + convertBitmapRGBA8ToUIImage:withWidth:withHeight: |
+ (NSInteger) angleFromDx: | (NSInteger) | dx | |
andDy: | (NSInteger) | dy | |
计算角度
dx | 经度 |
dy | 纬度 |
计算角度
posFrom | 起始点 |
posTo | 终点 |
+ (NSDictionary *) App_getNaviDataMetadata: | (NSString *) | fileName |
数据源
fileName | 文件相对路径 |
+ (UIImage *) convertBitmapRGBA8ToUIImage: | (unsigned char *) | buffer | |
withWidth: | (int) | width | |
withHeight: | (int) | height | |
位图转换成UIImage
buffer | 位图缓冲区大小 |
width | 宽 |
height | 高 |
+ (unsigned char *) convertUIImageToBitmapRGBA8: | (UIImage *) | image |
UIImage 转换成位图
image | UIImage |
+ (NSString *) Device_uniqueDeviceIdentifier |
获取设备唯一表示
+ (NSString *) distanceTextWithLength: | (NSInteger) | length |
NSInteger类型的距离转化成字符串类型的距离
length | NSInteger表示的长度 |
将世界坐标系下的经纬度表示的长度转换为屏幕坐标系下的长度,来绘制用于显示的比例尺。
startPoint | 起点坐标 |
endPoint | 终点坐标 |
将世界坐标系下的经纬度表示的长度转换为屏幕坐标系下的长度,来绘制用于显示的比例尺。
startPoint | 起点坐标 |
endPoint | 终点坐标 |
+ (NSString *) getAbsolutePath: | (NSString *) | relativePath |
相对路径转化绝对路径,客户端无需理会
relativePath | 相对路径 |
+ (int) isNightMode |
白天黑夜自动模式,根据当前时区自动判断是否是白天或者黑夜,需要开启定位 MBLocationManager
+ (MBDateTime) NSDate2DateTime: | (NSDate *) | date |
相对位置转化为字符串,比如"东偏北300米",但是如果小于等于100米,则返回"附近"
startPoint | 起始点 |
endPoint | 终点 |