| BaiduMap_IOSSDK_v6.6.5_Docs 6.6.5
    | 
import <BaiduMapAPI_Base/BMKTypes.h>import <UIKit/UIKit.h>| 类 | |
| category | NSValue(BMKGeometryExtension) | 
| 地图中c结构体对象和NSValue对象间相互转化  更多... | |
| 函数 | |
| UIKIT_EXTERN BMKMapPoint | BMKMapPointForCoordinate (CLLocationCoordinate2D coordinate) | 
| UIKIT_EXTERN CLLocationCoordinate2D | BMKCoordinateForMapPoint (BMKMapPoint mapPoint) | 
| UIKIT_EXTERN CGPoint | BMKConvertToBaiduMercatorFromBD09LL (CLLocationCoordinate2D bd09llCoordinate) | 
| UIKIT_EXTERN CLLocationCoordinate2D | BMKConvertToBD09LLFromBaiduMercator (CGPoint bdMCTCoordinate) | 
| UIKIT_EXTERN CLLocationCoordinate2D | BMKCoordTrans (CLLocationCoordinate2D coordinate, BMK_COORD_TYPE fromType, BMK_COORD_TYPE toType) | 
| FOUNDATION_EXTERN NSDictionary * | BMKConvertBaiduCoorFrom (CLLocationCoordinate2D coordinate, BMK_COORD_TYPE type) __attribute__((deprecated("使用BMKCoordTrans方法代替"))) | 
| UIKIT_EXTERN CLLocationDistance | BMKMetersPerMapPointAtLatitude (CLLocationDegrees latitude) | 
| UIKIT_EXTERN double | BMKMapPointsPerMeterAtLatitude (CLLocationDegrees latitude) | 
| UIKIT_EXTERN CLLocationDistance | BMKMetersBetweenMapPoints (BMKMapPoint a, BMKMapPoint b) | 
| UIKIT_EXTERN CLLocationDistance | BMKMetersBetweenCoordinates (CLLocationCoordinate2D a, CLLocationCoordinate2D b) | 
| UIKIT_STATIC_INLINE double | BMKMapRectGetWidth (BMKMapRect rect) | 
| UIKIT_STATIC_INLINE double | BMKMapRectGetHeight (BMKMapRect rect) | 
| UIKIT_STATIC_INLINE BOOL | BMKMapPointEqualToPoint (BMKMapPoint point1, BMKMapPoint point2) | 
| UIKIT_EXTERN BMKMapPoint | BMKGetNearestMapPointFromPolyline (BMKMapPoint point, BMKMapPoint *polyline, NSUInteger count) | 
| UIKIT_EXTERN BMKMapPoint | BMKGetPointToTheVerticalFootOfLine (BMKMapPoint point, BMKMapPoint lineStartPt, BMKMapPoint lineEndPt) | 
| UIKIT_EXTERN CLLocationDistance | BMKGetDistanceFromPointToLine (BMKMapPoint point, BMKMapPoint lineStartPt, BMKMapPoint lineEndPt) | 
| UIKIT_EXTERN BMKCoordinateRegion | BMKCoordinateRegionMakeWithDistance (CLLocationCoordinate2D centerCoordinate, CLLocationDistance latitudinalMeters, CLLocationDistance longitudinalMeters) | 
| UIKIT_STATIC_INLINE BOOL | BMKMapSizeEqualToSize (BMKMapSize size1, BMKMapSize size2) | 
| UIKIT_STATIC_INLINE BOOL | BMKMapRectEqualToRect (BMKMapRect rect1, BMKMapRect rect2) | 
| UIKIT_STATIC_INLINE BOOL | BMKMapRectIsEmpty (BMKMapRect rect) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectUnion (BMKMapRect rect1, BMKMapRect rect2) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectIntersection (BMKMapRect rect1, BMKMapRect rect2) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectInset (BMKMapRect rect, double dx, double dy) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectOffset (BMKMapRect rect, double dx, double dy) | 
| UIKIT_EXTERN void | BMKMapRectDivide (BMKMapRect rect, BMKMapRect *slice, BMKMapRect *remainder, double amount, CGRectEdge edge) | 
| UIKIT_EXTERN BOOL | BMKMapRectContainsPoint (BMKMapRect rect, BMKMapPoint point) | 
| UIKIT_EXTERN BOOL | BMKMapRectContainsRect (BMKMapRect rect1, BMKMapRect rect2) | 
| UIKIT_EXTERN BOOL | BMKMapRectIntersectsRect (BMKMapRect rect1, BMKMapRect rect2) | 
| UIKIT_EXTERN BMKCoordinateRegion | BMKCoordinateRegionForMapRect (BMKMapRect rect) | 
| UIKIT_EXTERN BOOL | BMKMapRectSpans180thMeridian (BMKMapRect rect) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectRemainder (BMKMapRect rect) | 
| UIKIT_EXTERN BOOL | BMKCircleContainsPoint (BMKMapPoint point, BMKMapPoint center, double radius) | 
| UIKIT_EXTERN BOOL | BMKCircleContainsCoordinate (CLLocationCoordinate2D point, CLLocationCoordinate2D center, double radius) | 
| UIKIT_EXTERN BOOL | BMKPolygonContainsPoint (BMKMapPoint point, BMKMapPoint *polygon, NSUInteger count) | 
| UIKIT_EXTERN BOOL | BMKPolygonContainsCoordinate (CLLocationCoordinate2D point, CLLocationCoordinate2D *polygon, NSUInteger count) | 
| UIKIT_EXTERN double | BMKAreaBetweenCoordinates (CLLocationCoordinate2D leftTop, CLLocationCoordinate2D rightBottom) | 
| UIKIT_EXTERN double | BMKAreaForPolygon (CLLocationCoordinate2D *coordinates, int count) | 
| UIKIT_EXTERN CLLocationDirection | BMKGetDirectionFromCoords (CLLocationCoordinate2D startCoord, CLLocationCoordinate2D endCoord) | 
| UIKIT_EXTERN CLLocationDirection | BMKGetDirectionFromPoints (BMKMapPoint startPt, BMKMapPoint endPt) | 
| UIKIT_STATIC_INLINE NSString * | BMKStringFromMapPoint (BMKMapPoint point) | 
| UIKIT_STATIC_INLINE NSString * | BMKStringFromMapSize (BMKMapSize size) | 
| UIKIT_STATIC_INLINE NSString * | BMKStringFromMapRect (BMKMapRect rect) | 
| UIKIT_EXTERN CLLocationCoordinate2D | BMKCoorDictionaryDecode (NSDictionary *dictionary) | 
| UIKIT_EXTERN BMKMapRect | BMKMapRectFromEncodedGeoPoints (NSString *encodedGeoPoints, BMKEncodePointType type) | 
| UIKIT_EXTERN BOOL | BMKEncodedGeoPointsContainsPoint (BMKMapPoint point, NSString *encodedGeoPoints, BMKEncodePointType type) | 
| UIKIT_EXTERN BOOL | BMKEncodedGeoPointsContainsCoordinate (CLLocationCoordinate2D point, NSString *encodedGeoPoints, BMKEncodePointType type) | 
| UIKIT_EXTERN double BMKAreaBetweenCoordinates | ( | CLLocationCoordinate2D | leftTop, | 
| CLLocationCoordinate2D | rightBottom ) | 
计算地理矩形区域的面积
| leftTop | 左上角经纬度坐标点 | 
| rightBottom | 右下角经纬度坐标点 | 
| UIKIT_EXTERN double BMKAreaForPolygon | ( | CLLocationCoordinate2D * | coordinates, | 
| int | count ) | 
根据经纬度计算多边形面积,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 该计算是将地球视为标准球体(R=6378137.0)得到的结果,与实际地理面积有误差。
| coordinates | 指定的经纬度坐标点数组,C数组,调用者负责内存管理 | 
| count | 坐标点的个数 count >=3 | 
| UIKIT_EXTERN BOOL BMKCircleContainsCoordinate | ( | CLLocationCoordinate2D | point, | 
| CLLocationCoordinate2D | center, | ||
| double | radius ) | 
判断点是否在圆内
| point | 待判断的经纬度坐标点 | 
| center | 目标圆形的中心点经纬度坐标 | 
| radius | 目标圆形的半径,单位m | 
| UIKIT_EXTERN BOOL BMKCircleContainsPoint | ( | BMKMapPoint | point, | 
| BMKMapPoint | center, | ||
| double | radius ) | 
判断点是否在圆内
| point | 待判断的平面坐标点 | 
| center | 目标圆形的中心点平面坐标 | 
| radius | 目标圆形的半径,单位m | 
| FOUNDATION_EXTERN NSDictionary * BMKConvertBaiduCoorFrom | ( | CLLocationCoordinate2D | coordinate, | 
| BMK_COORD_TYPE | type ) | 
坐标转换函数,从原始GPS坐标,mapbar坐标,google坐标,51地图坐标,mapabc坐标转换为百度坐标(51地图坐标需要显出10000)
| coordinate | 待转换的坐标 | 
| type | 待转换的坐标系类型,GPS为原始GPS坐标,COMMON为google坐标,51地图坐标,mapabc坐标 | 
| UIKIT_EXTERN CGPoint BMKConvertToBaiduMercatorFromBD09LL | ( | CLLocationCoordinate2D | bd09llCoordinate | ) | 
由百度经纬度坐标转换得到百度墨卡托坐标
| bd09llCoordinate | 百度经纬度坐标bd09ll | 
| UIKIT_EXTERN CLLocationCoordinate2D BMKConvertToBD09LLFromBaiduMercator | ( | CGPoint | bdMCTCoordinate | ) | 
由百度墨卡托坐标转换得到百度经纬度坐标
| bdMCTCoordinate | 百度墨卡托坐标 | 
| UIKIT_EXTERN CLLocationCoordinate2D BMKCoorDictionaryDecode | ( | NSDictionary * | dictionary | ) | 
base64加密后的坐标字典解密函数
| dictionary | 带解密的NSDictionry,该NSDictionry中应包含“x”,“y”字段,各自对应经过base64加密之后的x,y坐标 | 
| UIKIT_EXTERN CLLocationCoordinate2D BMKCoordinateForMapPoint | ( | BMKMapPoint | mapPoint | ) | 
将投影后的直角地理坐标转换为经纬度坐标
| mapPoint | 投影后的直角地理坐标 | 
| UIKIT_EXTERN BMKCoordinateRegion BMKCoordinateRegionForMapRect | ( | BMKMapRect | rect | ) | 
将投影后的直角坐标矩形转换为泳经纬度表示的范围
| rect | 待转换的直角坐标矩形 | 
| UIKIT_EXTERN BMKCoordinateRegion BMKCoordinateRegionMakeWithDistance | ( | CLLocationCoordinate2D | centerCoordinate, | 
| CLLocationDistance | latitudinalMeters, | ||
| CLLocationDistance | longitudinalMeters ) | 
根据中心点和距离生成BMKCoordinateRegion
| centerCoordinate | 中心点坐标 | 
| latitudinalMeters | 纬度方向的距离范围,单位:米 | 
| longitudinalMeters | 经度方向的距离范围,单位:米 | 
| UIKIT_EXTERN CLLocationCoordinate2D BMKCoordTrans | ( | CLLocationCoordinate2D | coordinate, | 
| BMK_COORD_TYPE | fromType, | ||
| BMK_COORD_TYPE | toType ) | 
经纬度坐标之间的坐标转换 支持WGS84LL->BD09LL, WGS84LL->GCJ02LL, GCJ02LL->BD09LL, BD09LL->GCJ02LL 输入输出坐标为其他类型时,认为是非法输入,返回的坐标中经纬度均为0
| coordinate | 待转换的原始经纬度坐标 | 
| fromType | 原始经纬度坐标的坐标类型 | 
| toType | 目标的经纬度坐标类型 | 
| UIKIT_EXTERN BOOL BMKEncodedGeoPointsContainsCoordinate | ( | CLLocationCoordinate2D | point, | 
| NSString * | encodedGeoPoints, | ||
| BMKEncodePointType | type ) | 
判断点是否在多边形加密点集内 since 6.6.0
| point | 待判断的经纬度点 | 
| encodedGeoPoints | 加密的点信息 | 
| type | 加密数据类型 | 
| UIKIT_EXTERN BOOL BMKEncodedGeoPointsContainsPoint | ( | BMKMapPoint | point, | 
| NSString * | encodedGeoPoints, | ||
| BMKEncodePointType | type ) | 
判断点是否在多边形加密点集内 since 6.6.0
| point | 待判断的平面坐标点 | 
| encodedGeoPoints | 加密的点信息 | 
| type | 加密数据类型 | 
| UIKIT_EXTERN CLLocationDirection BMKGetDirectionFromCoords | ( | CLLocationCoordinate2D | startCoord, | 
| CLLocationCoordinate2D | endCoord ) | 
获取矢量坐标方向
| startCoord | 矢量坐标起点 | 
| endCoord | 矢量坐标终点 | 
| UIKIT_EXTERN CLLocationDirection BMKGetDirectionFromPoints | ( | BMKMapPoint | startPt, | 
| BMKMapPoint | endPt ) | 
获取矢量坐标方向
| startPt | 矢量坐标起点 | 
| endPt | 矢量坐标终点 | 
| UIKIT_EXTERN CLLocationDistance BMKGetDistanceFromPointToLine | ( | BMKMapPoint | point, | 
| BMKMapPoint | lineStartPt, | ||
| BMKMapPoint | lineEndPt ) | 
获取点到线的垂距
| point | 目标点 | 
| lineStartPt | 线的起点 | 
| lineEndPt | 线的终点 | 
| UIKIT_EXTERN BMKMapPoint BMKGetNearestMapPointFromPolyline | ( | BMKMapPoint | point, | 
| BMKMapPoint * | polyline, | ||
| NSUInteger | count ) | 
获取折线外某点到这线上距离最近的点
| point | 待判断的经纬度点 | 
| polyline | 目标折线的顶点数组 | 
| count | 目标折线顶点数组元素个数 | 
| UIKIT_EXTERN BMKMapPoint BMKGetPointToTheVerticalFootOfLine | ( | BMKMapPoint | point, | 
| BMKMapPoint | lineStartPt, | ||
| BMKMapPoint | lineEndPt ) | 
点到线段的垂足
| point | 目标点 | 
| lineStartPt | 线的起点 | 
| lineEndPt | 线的终点 | 
| UIKIT_STATIC_INLINE BOOL BMKMapPointEqualToPoint | ( | BMKMapPoint | point1, | 
| BMKMapPoint | point2 ) | 
判断两个点是否相等
| point1 | 第一个点 | 
| point2 | 第二个点 | 
| UIKIT_EXTERN BMKMapPoint BMKMapPointForCoordinate | ( | CLLocationCoordinate2D | coordinate | ) | 
将经纬度坐标转换为投影后的直角地理坐标
| coordinate | 待转换的经纬度坐标 | 
| UIKIT_EXTERN double BMKMapPointsPerMeterAtLatitude | ( | CLLocationDegrees | latitude | ) | 
计算在指定纬度下一米对应的MKMapPoint的单位数
| latitude | 指定的纬度 | 
| UIKIT_EXTERN BOOL BMKMapRectContainsPoint | ( | BMKMapRect | rect, | 
| BMKMapPoint | point ) | 
判断指定点是否在某矩形内
| rect | 指定的矩形 | 
| point | 指定的点 | 
| UIKIT_EXTERN BOOL BMKMapRectContainsRect | ( | BMKMapRect | rect1, | 
| BMKMapRect | rect2 ) | 
判断矩形rect1是否包含矩形rect2
| rect1 | 矩形1 | 
| rect2 | 矩形2 | 
| UIKIT_EXTERN void BMKMapRectDivide | ( | BMKMapRect | rect, | 
| BMKMapRect * | slice, | ||
| BMKMapRect * | remainder, | ||
| double | amount, | ||
| CGRectEdge | edge ) | 
矩形分割,将一个矩形分割为两个矩形
| rect | 待分割的矩形 | 
| slice | 指针,用来保存分割后被移除的矩形 | 
| remainder | 指针,用来保存分割后剩下的矩形 | 
| amount | 指定分割的大小,如果设置为负数,则将自动调整为0 | 
| edge | 用来指定要从那条边开始分割 | 
| UIKIT_STATIC_INLINE BOOL BMKMapRectEqualToRect | ( | BMKMapRect | rect1, | 
| BMKMapRect | rect2 ) | 
判断两个矩形是否相等
| rect1 | 矩形1 | 
| rect2 | 矩形2 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectFromEncodedGeoPoints | ( | NSString * | encodedGeoPoints, | 
| BMKEncodePointType | type ) | 
根据加密坐标数据计算出其外接矩形 since 6.5.2
| encodedGeoPoints | 加密的点信息 | 
| type | 加密数据类型 | 
| UIKIT_STATIC_INLINE double BMKMapRectGetHeight | ( | BMKMapRect | rect | ) | 
获取指定矩形的高度
| rect | 指定的矩形 | 
| UIKIT_STATIC_INLINE double BMKMapRectGetWidth | ( | BMKMapRect | rect | ) | 
获取指定矩形的宽度
| rect | 指定的矩形 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectInset | ( | BMKMapRect | rect, | 
| double | dx, | ||
| double | dy ) | 
将矩形向内缩小dx,dy大小
| rect | 指定的矩形 | 
| dx | x轴的变化量 | 
| dy | y轴的变化量 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectIntersection | ( | BMKMapRect | rect1, | 
| BMKMapRect | rect2 ) | 
计算两个矩形的交集
| rect1 | 矩形1 | 
| rect2 | 矩形2 | 
| UIKIT_EXTERN BOOL BMKMapRectIntersectsRect | ( | BMKMapRect | rect1, | 
| BMKMapRect | rect2 ) | 
判断两矩形是否相交
| rect1 | 矩形1 | 
| rect2 | 矩形2 | 
| UIKIT_STATIC_INLINE BOOL BMKMapRectIsEmpty | ( | BMKMapRect | rect | ) | 
判断一个矩形是否为空矩形
| rect | 指定矩形 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectOffset | ( | BMKMapRect | rect, | 
| double | dx, | ||
| double | dy ) | 
将矩形原点偏移指定大小
| rect | 指定的矩形 | 
| dx | x轴的偏移量 | 
| dy | y轴的偏移量 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectRemainder | ( | BMKMapRect | rect | ) | 
对于跨越了180经线的矩形,本函数将世界之外的部分进行分割,并将分割下来的矩形转换到地球对面,例如将-185度经线对应的区域转换到5度经线对应的区域,并将转换后的矩形返回
| rect | 待处理的矩形 | 
| UIKIT_EXTERN BOOL BMKMapRectSpans180thMeridian | ( | BMKMapRect | rect | ) | 
判断指定的直角坐标矩形是否跨越了180度经线
| rect | 待判断的矩形 | 
| UIKIT_EXTERN BMKMapRect BMKMapRectUnion | ( | BMKMapRect | rect1, | 
| BMKMapRect | rect2 ) | 
计算两个矩形的并集
| rect1 | 矩形1 | 
| rect2 | 矩形2 | 
| UIKIT_STATIC_INLINE BOOL BMKMapSizeEqualToSize | ( | BMKMapSize | size1, | 
| BMKMapSize | size2 ) | 
判断两个矩形范围是否相等
| size1 | 范围1 | 
| size2 | 范围2 | 
| UIKIT_EXTERN CLLocationDistance BMKMetersBetweenCoordinates | ( | CLLocationCoordinate2D | a, | 
| CLLocationCoordinate2D | b ) | 
计算指定两点之间的距离(经纬度)
| a | 第一个经纬度 | 
| b | 第二个经纬度 | 
| UIKIT_EXTERN CLLocationDistance BMKMetersBetweenMapPoints | ( | BMKMapPoint | a, | 
| BMKMapPoint | b ) | 
计算指定两点之间的距离(平面直角坐标)
| a | 第一个坐标点 | 
| b | 第二个坐标点 | 
| UIKIT_EXTERN CLLocationDistance BMKMetersPerMapPointAtLatitude | ( | CLLocationDegrees | latitude | ) | 
计算在指定纬度下一个BMKMapPoint单位对应的米数
| latitude | 指定的纬度 | 
| UIKIT_EXTERN BOOL BMKPolygonContainsCoordinate | ( | CLLocationCoordinate2D | point, | 
| CLLocationCoordinate2D * | polygon, | ||
| NSUInteger | count ) | 
判断点是否在多边形内
| point | 待判断的经纬度点 | 
| polygon | 目标多边形的顶点数组 | 
| count | 目标多边形顶点数组元素个数 | 
| UIKIT_EXTERN BOOL BMKPolygonContainsPoint | ( | BMKMapPoint | point, | 
| BMKMapPoint * | polygon, | ||
| NSUInteger | count ) | 
判断点是否在多边形内
| point | 待判断的平面坐标点 | 
| polygon | 目标多边形的顶点数组 | 
| count | 目标多边形顶点数组元素个数 | 
| UIKIT_STATIC_INLINE NSString * BMKStringFromMapPoint | ( | BMKMapPoint | point | ) | 
将BMKMapPoint格式化为字符串
| point | 指定的标点 | 
| UIKIT_STATIC_INLINE NSString * BMKStringFromMapRect | ( | BMKMapRect | rect | ) | 
将BMKMapRect格式化为字符串
| rect | 指定的rect | 
| UIKIT_STATIC_INLINE NSString * BMKStringFromMapSize | ( | BMKMapSize | size | ) | 
将BMKMapSize格式化为字符串
| size | 指定的size |