|
高德地图SDK(导航)
V11.1.000
|
#import "MAConfig.h"#import <CoreGraphics/CoreGraphics.h>#import <CoreLocation/CoreLocation.h>#import <UIKit/UIKit.h>Go to the source code of this file.
Classes | |
| struct | MACoordinateBounds |
| struct | MACoordinateSpan |
| struct | MACoordinateRegion |
| struct | MAMapPoint |
| struct | MAMapSize |
| struct | MAMapRect |
| category | NSValue(NSValueMAGeometryExtensions) |
Typedefs | |
| typedef struct MACoordinateBounds | MACoordinateBounds |
| typedef struct MACoordinateSpan | MACoordinateSpan |
| typedef struct MACoordinateRegion | MACoordinateRegion |
| typedef struct MAMapPoint | MAMapPoint |
| typedef struct MAMapSize | MAMapSize |
| typedef struct MAMapRect | MAMapRect |
| typedef double | MAZoomScale |
| typedef void(^ | AMapTileProjectionBlock) (int offsetX, int offsetY, int minX, int maxX, int minY, int maxY) |
| 获取墨卡托投影切块回调block,如果是无效的映射,则返回(-1, -1, 0, 0, 0, 0) Get the Mercator projection tile callback block, if it is an invalid mapping, return (-1, -1, 0, 0, 0, 0); More... | |
Enumerations | |
| enum | MACoordinateType : NSUInteger { MACoordinateTypeBaidu = 0 , MACoordinateTypeMapBar , MACoordinateTypeMapABC , MACoordinateTypeSoSoMap , MACoordinateTypeAliYun , MACoordinateTypeGoogle , MACoordinateTypeGPS } |
Functions | |
| typedef | NS_OPTIONS (NSUInteger, MAMapRectCorner) |
| MACoordinateRegion | MACoordinateRegionMakeWithDistance (CLLocationCoordinate2D centerCoordinate, CLLocationDistance latitudinalMeters, CLLocationDistance longitudinalMeters) |
| 生成一个新的MACoordinateRegion Generate a new MACoordinateRegion More... | |
| MAMapPoint | MAMapPointForCoordinate (CLLocationCoordinate2D coordinate) |
| 经纬度坐标转平面投影坐标 Convert latitude and longitude coordinates to planar projection coordinates More... | |
| CLLocationCoordinate2D | MACoordinateForMapPoint (MAMapPoint mapPoint) |
| 平面投影坐标转经纬度坐标 Convert planar projection coordinates to latitude and longitude coordinates More... | |
| MACoordinateRegion | MACoordinateRegionForMapRect (MAMapRect rect) |
| 平面投影矩形转region Planar projection rectangle to region More... | |
| MAMapRect | MAMapRectForCoordinateRegion (MACoordinateRegion region) |
| region转平面投影矩形 Region to planar projection rectangle More... | |
| CLLocationDistance | MAMetersPerMapPointAtLatitude (CLLocationDegrees latitude) |
| 单位投影的距离 Unit projection distance More... | |
| double | MAMapPointsPerMeterAtLatitude (CLLocationDegrees latitude) |
| 1米对应的投影 Projection corresponding to 1 meter More... | |
| CLLocationDistance | MAMetersBetweenMapPoints (MAMapPoint a, MAMapPoint b) |
| 投影两点之间的距离 Distance between two projection points More... | |
| double | MAAreaBetweenCoordinates (CLLocationCoordinate2D northEast, CLLocationCoordinate2D southWest) |
| 经纬度间的面积(单位 平方米) Area between latitude and longitude (unit: square meters) More... | |
| MAMapRect | MAMapRectInset (MAMapRect rect, double dx, double dy) |
| 获取Inset后的MAMapRect Get the MAMapRect after Inset More... | |
| MAMapRect | MAMapRectUnion (MAMapRect rect1, MAMapRect rect2) |
| 合并两个MAMapRect Merge two MAMapRects More... | |
| BOOL | MAMapSizeContainsSize (MAMapSize size1, MAMapSize size2) |
| 判断size1是否包含size2 Determine if size1 contains size2 More... | |
| BOOL | MAMapRectContainsPoint (MAMapRect rect, MAMapPoint point) |
| 判断点是否在矩形内 Determine if the point is inside the rectangle More... | |
| BOOL | MAMapRectIntersectsRect (MAMapRect rect1, MAMapRect rect2) |
| 判断两矩形是否相交 Determine if two rectangles intersect More... | |
| BOOL | MAMapRectContainsRect (MAMapRect rect1, MAMapRect rect2) |
| 判断矩形rect1是否包含矩形rect2 Determine if rectangle rect1 contains rectangle rect2 More... | |
| BOOL | MACircleContainsPoint (MAMapPoint point, MAMapPoint center, double radius) |
| 判断点是否在圆内 Determine if a point is inside a circle More... | |
| BOOL | MACircleContainsCoordinate (CLLocationCoordinate2D point, CLLocationCoordinate2D center, double radius) |
| 判断经纬度点是否在圆内 Determine if a latitude and longitude point is within a circle More... | |
| MAMapPoint | MAGetNearestMapPointFromPolyline (MAMapPoint point, MAMapPoint *polyline, NSUInteger count) |
| 获取某坐标点距线上最近的坐标点 Get the nearest point on a line from a coordinate point More... | |
| BOOL | MAPolygonContainsPoint (MAMapPoint point, MAMapPoint *polygon, NSUInteger count) |
| 判断点是否在多边形内 Determine if a point is inside a polygon More... | |
| BOOL | MAPolygonContainsCoordinate (CLLocationCoordinate2D point, CLLocationCoordinate2D *polygon, NSUInteger count) |
| 判断经纬度点是否在多边形内 Determine if a latitude and longitude point is inside a polygon More... | |
| MAMapPoint | MAGetNearestMapPointFromLine (MAMapPoint lineStart, MAMapPoint lineEnd, MAMapPoint point) |
| 取在lineStart和lineEnd组成的线段上距离point距离最近的点 Take the point on the line segment formed by lineStart and lineEnd that is closest to point More... | |
| void | MAGetTileProjectionFromBounds (MACoordinateBounds bounds, int levelOfDetails, AMapTileProjectionBlock tileProjection) |
| 根据所给经纬度区域获取墨卡托投影切块信息 Obtain Mercator projection tile information based on the given latitude and longitude area More... | |
| double | MAAreaForPolygon (CLLocationCoordinate2D *coordinates, int count) |
| 计算多边形面积,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 Calculate the area of a polygon, where points are connected sequentially from tail to head, and the first point is connected to the last point More... | |
| CLLocationCoordinate2D | MACoordinateConvert (CLLocationCoordinate2D coordinate, MACoordinateType type) __attribute((deprecated("Deprecated |
| 转换目标经纬度为高德坐标系 Convert target coordinates to AutoNavi coordinate system More... | |
| CLLocationDirection | MAGetDirectionFromCoords (CLLocationCoordinate2D fromCoord, CLLocationCoordinate2D toCoord) |
| 获取矢量坐标方向 Get vector coordinate direction More... | |
| CLLocationDirection | MAGetDirectionFromPoints (MAMapPoint fromPoint, MAMapPoint toPoint) |
| 获取矢量坐标方向 Get vector coordinate direction More... | |
| double | MAGetDistanceFromPointToLine (MAMapPoint point, MAMapPoint lineBegin, MAMapPoint lineEnd) |
| 获取点到线的垂直距离 Get perpendicular distance from point to line More... | |
| BOOL | MAPolylineHitTest (MAMapPoint *linePoints, NSUInteger count, MAMapPoint tappedPoint, CGFloat lineWidth) |
| 判断线是否被点击选中 Determine if the line is clicked and selected More... | |
Variables | |
| const MAMapSize | MAMapSizeWorld |
| const MAMapRect | MAMapRectWorld |
| const MAMapRect | MAMapRectNull |
| (MAMapRect){{INFINITY, INFINITY}, {0, 0}}; More... | |
| const MAMapRect | MAMapRectZero |
| (MAMapRect){{0, 0}, {0, 0}} More... | |
| CLLocationCoordinate2D use the coordinate conversion interface in | AMapFoundation |
| typedef void(^ AMapTileProjectionBlock) (int offsetX, int offsetY, int minX, int maxX, int minY, int maxY) |
获取墨卡托投影切块回调block,如果是无效的映射,则返回(-1, -1, 0, 0, 0, 0) Get the Mercator projection tile callback block, if it is an invalid mapping, return (-1, -1, 0, 0, 0, 0);
| offsetX | 左上点距离所属tile的位移X, 单位像素 The displacement X of the top-left point from the tile it belongs to, in pixels |
| offsetY | 左上点距离所属tile的位移Y, 单位像素 The displacement Y of the top-left point from the tile it belongs to, in pixels |
| minX | 覆盖tile的最小x Minimum x of the covered tile |
| maxX | 覆盖tile的最大x Maximum x of the covered tile |
| minY | 覆盖tile的最小y Minimum y of the covered tile |
| maxY | 覆盖tile的最大y Maximum y of the covered tile |
| typedef struct MACoordinateBounds MACoordinateBounds |
东北、西南两个点定义的四边形经纬度范围 Latitude and longitude range of the quadrilateral defined by the northeast and southwest points
| typedef struct MACoordinateRegion MACoordinateRegion |
中心点、跨度范围定义的四边形经纬度范围 Quadrilateral latitude and longitude range defined by center point and span
| typedef struct MACoordinateSpan MACoordinateSpan |
经度、纬度定义的经纬度跨度范围 Latitude and longitude span range defined by longitude and latitude
| typedef struct MAMapPoint MAMapPoint |
平面投影坐标结构定义 Plane projection coordinate structure definition
| typedef double MAZoomScale |
比例关系:MAZoomScale = Screen Point / MAMapPoint, 当MAZoomScale = 1时, 1 screen point = 1 MAMapPoint, 当MAZoomScale = 0.5时, 1 screen point = 2 MAMapPoints Proportional relationship: MAZoomScale = Screen Point / MAMapPoint, when MAZoomScale = 1, 1 screen point = 1 MAMapPoint, when MAZoomScale = 0.5, 1 screen point = 2 MAMapPoints
| enum MACoordinateType : NSUInteger |
| double MAAreaBetweenCoordinates | ( | CLLocationCoordinate2D | northEast, |
| CLLocationCoordinate2D | southWest | ||
| ) |
经纬度间的面积(单位 平方米) Area between latitude and longitude (unit: square meters)
| northEast | 东北经纬度 Northeast latitude and longitude |
| southWest | 西南经纬度 Southwest latitude and longitude |
| double MAAreaForPolygon | ( | CLLocationCoordinate2D * | coordinates, |
| int | count | ||
| ) |
计算多边形面积,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 Calculate the area of a polygon, where points are connected sequentially from tail to head, and the first point is connected to the last point
| coordinates | 指定的经纬度坐标点数组,C数组,调用者负责内存管理 The specified array of latitude and longitude coordinate points, a C array, memory management is the responsibility of the caller |
| count | 坐标点的个数 The number of coordinate points |
| BOOL MACircleContainsCoordinate | ( | CLLocationCoordinate2D | point, |
| CLLocationCoordinate2D | center, | ||
| double | radius | ||
| ) |
判断经纬度点是否在圆内 Determine if a latitude and longitude point is within a circle
| point | 经纬度 Latitude and longitude |
| center | 圆的中心经纬度 Center latitude and longitude of the circle |
| radius | 圆的半径,单位米 Radius of the circle, in meters |
| BOOL MACircleContainsPoint | ( | MAMapPoint | point, |
| MAMapPoint | center, | ||
| double | radius | ||
| ) |
判断点是否在圆内 Determine if a point is inside a circle
| point | 点 Point |
| center | 圆的中心点 Center point of the circle |
| radius | 圆的半径,单位米 Radius of the circle, in meters |
| CLLocationCoordinate2D MACoordinateConvert | ( | CLLocationCoordinate2D | coordinate, |
| MACoordinateType | type | ||
| ) |
转换目标经纬度为高德坐标系 Convert target coordinates to AutoNavi coordinate system
| coordinate | 待转换的经纬度 Coordinates to be converted |
| type | 坐标系类型 Coordinate system type |
| CLLocationCoordinate2D MACoordinateForMapPoint | ( | MAMapPoint | mapPoint | ) |
平面投影坐标转经纬度坐标 Convert planar projection coordinates to latitude and longitude coordinates
| mapPoint | 要转化的平面投影坐标 Planar projection coordinates to be converted |
| MACoordinateRegion MACoordinateRegionForMapRect | ( | MAMapRect | rect | ) |
平面投影矩形转region Planar projection rectangle to region
| rect | 要转化的平面投影矩形 Planar projection rectangle to be converted |
| MACoordinateRegion MACoordinateRegionMakeWithDistance | ( | CLLocationCoordinate2D | centerCoordinate, |
| CLLocationDistance | latitudinalMeters, | ||
| CLLocationDistance | longitudinalMeters | ||
| ) |
生成一个新的MACoordinateRegion Generate a new MACoordinateRegion
| centerCoordinate | 中心点坐标 center coordinate |
| latitudinalMeters | 垂直跨度(单位 米) vertical span (in meters) |
| longitudinalMeters | 水平跨度(单位 米) horizontal span (in meters) |
| CLLocationDirection MAGetDirectionFromCoords | ( | CLLocationCoordinate2D | fromCoord, |
| CLLocationCoordinate2D | toCoord | ||
| ) |
获取矢量坐标方向 Get vector coordinate direction
| fromCoord | 矢量坐标起点 Vector coordinate start point |
| toCoord | 矢量坐标终点 Vector coordinate end point |
| CLLocationDirection MAGetDirectionFromPoints | ( | MAMapPoint | fromPoint, |
| MAMapPoint | toPoint | ||
| ) |
获取矢量坐标方向 Get vector coordinate direction
| fromPoint | 矢量坐标起点 Vector coordinate start point |
| toPoint | 矢量坐标终点 Vector coordinate end point |
| double MAGetDistanceFromPointToLine | ( | MAMapPoint | point, |
| MAMapPoint | lineBegin, | ||
| MAMapPoint | lineEnd | ||
| ) |
获取点到线的垂直距离 Get perpendicular distance from point to line
| point | 起点 Start point |
| lineBegin | 线的起点 Start point of the line |
| lineEnd | 线的终点 End point of the line |
| MAMapPoint MAGetNearestMapPointFromLine | ( | MAMapPoint | lineStart, |
| MAMapPoint | lineEnd, | ||
| MAMapPoint | point | ||
| ) |
取在lineStart和lineEnd组成的线段上距离point距离最近的点 Take the point on the line segment formed by lineStart and lineEnd that is closest to point
| lineStart | 线段起点 Line segment starting point |
| lineEnd | 线段终点 Line segment ending point |
| point | 测试点 Test point |
| MAMapPoint MAGetNearestMapPointFromPolyline | ( | MAMapPoint | point, |
| MAMapPoint * | polyline, | ||
| NSUInteger | count | ||
| ) |
获取某坐标点距线上最近的坐标点 Get the nearest point on a line from a coordinate point
| point | 点 Point |
| polyline | 线 Line |
| count | 线里点的数量 Number of points in the line |
| void MAGetTileProjectionFromBounds | ( | MACoordinateBounds | bounds, |
| int | levelOfDetails, | ||
| AMapTileProjectionBlock | tileProjection | ||
| ) |
根据所给经纬度区域获取墨卡托投影切块信息 Obtain Mercator projection tile information based on the given latitude and longitude area
| bounds | 经纬度区域 Latitude and longitude area |
| levelOfDetails | 对应缩放级别, 取值0-20 Corresponding zoom level, value range 0-20 |
| tileProjection | 返回的切块信息block Returned tile information block |
| MAMapPoint MAMapPointForCoordinate | ( | CLLocationCoordinate2D | coordinate | ) |
经纬度坐标转平面投影坐标 Convert latitude and longitude coordinates to planar projection coordinates
| coordinate | 要转化的经纬度坐标 Latitude and longitude coordinates to be converted |
| double MAMapPointsPerMeterAtLatitude | ( | CLLocationDegrees | latitude | ) |
1米对应的投影 Projection corresponding to 1 meter
| latitude | 经纬度 Latitude and longitude |
| BOOL MAMapRectContainsPoint | ( | MAMapRect | rect, |
| MAMapPoint | point | ||
| ) |
判断点是否在矩形内 Determine if the point is inside the rectangle
| rect | 矩形rect Rectangle rect |
| point | 点 Point |
判断矩形rect1是否包含矩形rect2 Determine if rectangle rect1 contains rectangle rect2
| rect1 | rect1 |
| rect2 | rect2 |
| MAMapRect MAMapRectForCoordinateRegion | ( | MACoordinateRegion | region | ) |
region转平面投影矩形 Region to planar projection rectangle
| region | region 要转化的region Region to be converted |
判断两矩形是否相交 Determine if two rectangles intersect
| rect1 | rect1 |
| rect2 | rect2 |
合并两个MAMapRect Merge two MAMapRects
| rect1 | rect1 |
| rect2 | rect2 |
判断size1是否包含size2 Determine if size1 contains size2
| size1 | size1 |
| size2 | size2 |
| CLLocationDistance MAMetersBetweenMapPoints | ( | MAMapPoint | a, |
| MAMapPoint | b | ||
| ) |
投影两点之间的距离 Distance between two projection points
| a | a点 Point a |
| b | b点 Point b |
| CLLocationDistance MAMetersPerMapPointAtLatitude | ( | CLLocationDegrees | latitude | ) |
单位投影的距离 Unit projection distance
| latitude | 经纬度 Latitude and longitude |
| BOOL MAPolygonContainsCoordinate | ( | CLLocationCoordinate2D | point, |
| CLLocationCoordinate2D * | polygon, | ||
| NSUInteger | count | ||
| ) |
判断经纬度点是否在多边形内 Determine if a latitude and longitude point is inside a polygon
| point | 经纬度点 Latitude and longitude point |
| polygon | 多边形 Polygon |
| count | 多边形点的数量 Number of polygon points |
| BOOL MAPolygonContainsPoint | ( | MAMapPoint | point, |
| MAMapPoint * | polygon, | ||
| NSUInteger | count | ||
| ) |
判断点是否在多边形内 Determine if a point is inside a polygon
| point | 点 Point |
| polygon | 多边形 Polygon |
| count | 多边形点的数量 Number of polygon points |
| BOOL MAPolylineHitTest | ( | MAMapPoint * | linePoints, |
| NSUInteger | count, | ||
| MAMapPoint | tappedPoint, | ||
| CGFloat | lineWidth | ||
| ) |
判断线是否被点击选中 Determine if the line is clicked and selected
| linePoints | 构成线的点 Points that form the line |
| count | 点的个数 Number of points |
| tappedPoint | 点击点 Click point |
| lineWidth | 线宽,单位:MAMapPoint点 Line width, unit: MAMapPoint |
| typedef NS_OPTIONS | ( | NSUInteger | , |
| MAMapRectCorner | |||
| ) |
| CLLocationCoordinate2D use the coordinate conversion interface in AMapFoundation |
|
extern |
世界范围四边形 World extent quadrilateral
|
extern |
世界范围大小 World extent size