10 #import <CoreGraphics/CoreGraphics.h>
11 #import <CoreLocation/CoreLocation.h>
12 #import <UIKit/UIKit.h>
62 MAMapRectCornerTopLeft = 1 << 0,
63 MAMapRectCornerTopRight = 1 << 1,
64 MAMapRectCornerBottomLeft = 1 << 2,
65 MAMapRectCornerBottomRight = 1 << 3,
66 MAMapRectCornerAllCorners = ~0UL
84 static inline MACoordinateBounds MACoordinateBoundsMake(CLLocationCoordinate2D northEast,CLLocationCoordinate2D southWest)
89 static inline MACoordinateSpan MACoordinateSpanMake(CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta)
386 static inline MAMapPoint MAMapPointMake(
double x,
double y)
391 static inline MAMapSize MAMapSizeMake(
double width,
double height)
396 static inline MAMapRect MAMapRectMake(
double x,
double y,
double width,
double height)
398 return (
MAMapRect){MAMapPointMake(x, y), MAMapSizeMake(width, height)};
401 static inline double MAMapRectGetMinX(
MAMapRect rect)
406 static inline double MAMapRectGetMinY(
MAMapRect rect)
411 static inline double MAMapRectGetMidX(
MAMapRect rect)
416 static inline double MAMapRectGetMidY(
MAMapRect rect)
421 static inline double MAMapRectGetMaxX(
MAMapRect rect)
426 static inline double MAMapRectGetMaxY(
MAMapRect rect)
431 static inline double MAMapRectGetWidth(
MAMapRect rect)
436 static inline double MAMapRectGetHeight(
MAMapRect rect)
442 return point1.
x == point2.
x && point1.
y == point2.
y;
452 MAMapSizeEqualToSize(rect1.
size, rect2.
size);
455 static inline BOOL MAMapRectIsNull(
MAMapRect rect) {
459 static inline BOOL MAMapRectIsEmpty(
MAMapRect rect) {
463 static inline NSString *MAStringFromMapPoint(
MAMapPoint point) {
464 return [NSString stringWithFormat:
@"{%.1f, %.1f}", point.
x, point.
y];
467 static inline NSString *MAStringFromMapSize(
MAMapSize size) {
468 return [NSString stringWithFormat:
@"{%.1f, %.1f}", size.
width, size.
height];
471 static inline NSString *MAStringFromMapRect(
MAMapRect rect) {
472 return [NSString stringWithFormat:
@"{%@, %@}", MAStringFromMapPoint(rect.
origin), MAStringFromMapSize(rect.
size)];
498 extern CLLocationCoordinate2D
MACoordinateConvert(CLLocationCoordinate2D coordinate,
MACoordinateType type) __attribute((deprecated(
"Deprecated, use the coordinate conversion interface in AMapFoundation")));
570 + (NSValue *)valueWithMAMapPoint:(
MAMapPoint)mapPoint;
580 + (NSValue *)valueWithMAMapSize:(
MAMapSize)mapSize;
590 + (NSValue *)valueWithMAMapRect:(
MAMapRect)mapRect;
600 + (NSValue *)valueWithMACoordinate:(CLLocationCoordinate2D)coordinate;
double MAMapPointsPerMeterAtLatitude(CLLocationDegrees latitude)
1米对应的投影 Projection corresponding to 1 meter
MAMapRect MAMapRectInset(MAMapRect rect, double dx, double dy)
获取Inset后的MAMapRect Get the MAMapRect after Inset
double MAZoomScale
Definition: MAGeometry.h:67
const MAMapSize MAMapSizeWorld
CLLocationCoordinate2D MACoordinateConvert(CLLocationCoordinate2D coordinate, MACoordinateType type) __attribute((deprecated("Deprecated
转换目标经纬度为高德坐标系 Convert target coordinates to AutoNavi coordinate system
MAMapPoint MAMapPointForCoordinate(CLLocationCoordinate2D coordinate)
经纬度坐标转平面投影坐标 Convert latitude and longitude coordinates to planar projection coordinates
struct MACoordinateBounds MACoordinateBounds
struct MAMapSize MAMapSize
const MAMapRect MAMapRectWorld
struct MAMapPoint MAMapPoint
BOOL MACircleContainsCoordinate(CLLocationCoordinate2D point, CLLocationCoordinate2D center, double radius)
判断经纬度点是否在圆内 Determine if a latitude and longitude point is within a circle
BOOL MAPolylineHitTest(MAMapPoint *linePoints, NSUInteger count, MAMapPoint tappedPoint, CGFloat lineWidth)
判断线是否被点击选中 Determine if the line is clicked and selected
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,...
Definition: MAGeometry.h:360
MAMapPoint MAGetNearestMapPointFromPolyline(MAMapPoint point, MAMapPoint *polyline, NSUInteger count)
获取某坐标点距线上最近的坐标点 Get the nearest point on a line from a coordinate point
BOOL MACircleContainsPoint(MAMapPoint point, MAMapPoint center, double radius)
判断点是否在圆内 Determine if a point is inside a circle
MAMapPoint MAGetNearestMapPointFromLine(MAMapPoint lineStart, MAMapPoint lineEnd, MAMapPoint point)
取在lineStart和lineEnd组成的线段上距离point距离最近的点 Take the point on the line segment formed by lineStart and lin...
CLLocationDirection MAGetDirectionFromCoords(CLLocationCoordinate2D fromCoord, CLLocationCoordinate2D toCoord)
获取矢量坐标方向 Get vector coordinate direction
MAMapRect MAMapRectUnion(MAMapRect rect1, MAMapRect rect2)
合并两个MAMapRect Merge two MAMapRects
MAMapRect MAMapRectForCoordinateRegion(MACoordinateRegion region)
region转平面投影矩形 Region to planar projection rectangle
CLLocationCoordinate2D MACoordinateForMapPoint(MAMapPoint mapPoint)
平面投影坐标转经纬度坐标 Convert planar projection coordinates to latitude and longitude coordinates
void MAGetTileProjectionFromBounds(MACoordinateBounds bounds, int levelOfDetails, AMapTileProjectionBlock tileProjection)
根据所给经纬度区域获取墨卡托投影切块信息 Obtain Mercator projection tile information based on the given latitude and long...
struct MAMapRect MAMapRect
BOOL MAPolygonContainsPoint(MAMapPoint point, MAMapPoint *polygon, NSUInteger count)
判断点是否在多边形内 Determine if a point is inside a polygon
BOOL MAMapSizeContainsSize(MAMapSize size1, MAMapSize size2)
判断size1是否包含size2 Determine if size1 contains size2
double MAAreaBetweenCoordinates(CLLocationCoordinate2D northEast, CLLocationCoordinate2D southWest)
经纬度间的面积(单位 平方米) Area between latitude and longitude (unit: square meters)
const MAMapRect MAMapRectZero
(MAMapRect){{0, 0}, {0, 0}}
struct MACoordinateSpan MACoordinateSpan
const MAMapRect MAMapRectNull
(MAMapRect){{INFINITY, INFINITY}, {0, 0}};
typedef NS_OPTIONS(NSUInteger, MAMapRectCorner)
Definition: MAGeometry.h:61
MACoordinateRegion MACoordinateRegionMakeWithDistance(CLLocationCoordinate2D centerCoordinate, CLLocationDistance latitudinalMeters, CLLocationDistance longitudinalMeters)
生成一个新的MACoordinateRegion Generate a new MACoordinateRegion
CLLocationDirection MAGetDirectionFromPoints(MAMapPoint fromPoint, MAMapPoint toPoint)
获取矢量坐标方向 Get vector coordinate direction
BOOL MAMapRectIntersectsRect(MAMapRect rect1, MAMapRect rect2)
判断两矩形是否相交 Determine if two rectangles intersect
double MAGetDistanceFromPointToLine(MAMapPoint point, MAMapPoint lineBegin, MAMapPoint lineEnd)
获取点到线的垂直距离 Get perpendicular distance from point to line
BOOL MAMapRectContainsRect(MAMapRect rect1, MAMapRect rect2)
判断矩形rect1是否包含矩形rect2 Determine if rectangle rect1 contains rectangle rect2
MACoordinateRegion MACoordinateRegionForMapRect(MAMapRect rect)
平面投影矩形转region Planar projection rectangle to region
CLLocationDistance MAMetersPerMapPointAtLatitude(CLLocationDegrees latitude)
单位投影的距离 Unit projection distance
BOOL MAMapRectContainsPoint(MAMapRect rect, MAMapPoint point)
判断点是否在矩形内 Determine if the point is inside the rectangle
MACoordinateType
Definition: MAGeometry.h:478
@ MACoordinateTypeMapABC
MapABC.
Definition: MAGeometry.h:481
@ MACoordinateTypeBaidu
Baidu.
Definition: MAGeometry.h:479
@ MACoordinateTypeAliYun
AliYun.
Definition: MAGeometry.h:483
@ MACoordinateTypeGoogle
Google.
Definition: MAGeometry.h:484
@ MACoordinateTypeSoSoMap
SoSoMap.
Definition: MAGeometry.h:482
@ MACoordinateTypeMapBar
MapBar.
Definition: MAGeometry.h:480
@ MACoordinateTypeGPS
GPS.
Definition: MAGeometry.h:485
BOOL MAPolygonContainsCoordinate(CLLocationCoordinate2D point, CLLocationCoordinate2D *polygon, NSUInteger count)
判断经纬度点是否在多边形内 Determine if a latitude and longitude point is inside a polygon
CLLocationDistance MAMetersBetweenMapPoints(MAMapPoint a, MAMapPoint b)
投影两点之间的距离 Distance between two projection points
struct MACoordinateRegion MACoordinateRegion
double MAAreaForPolygon(CLLocationCoordinate2D *coordinates, int count)
计算多边形面积,点与点之间按顺序尾部相连, 第一个点与最后一个点相连 Calculate the area of a polygon, where points are connected sequen...
Definition: MAGeometry.h:560
MAMapRect MAMapRectValue()
返回NSValue对象包含的MAMapRect结构体对象 Returns the MAMapRect structure contained in the NSValue object
MAMapPoint MAMapPointValue()
返回NSValue对象包含的MAMapPoint结构体对象 Returns the MAMapPoint structure contained in the NSValue object
MAMapSize MAMapSizeValue()
返回NSValue对象包含的MAMapSize结构体对象 Returns the MAMapSize structure contained in the NSValue object
CLLocationCoordinate2D MACoordinateValue()
返回NSValue对象包含的CLLocationCoordinate2D结构体对象 Returns the CLLocationCoordinate2D structure contained in t...
Definition: MAGeometry.h:21
CLLocationCoordinate2D northEast
东北角经纬度 Latitude and longitude of the northeast corner
Definition: MAGeometry.h:22
CLLocationCoordinate2D southWest
西南角经纬度 Latitude and longitude of the southwest corner
Definition: MAGeometry.h:23
Definition: MAGeometry.h:35
CLLocationCoordinate2D center
中心点经纬度 Center point latitude and longitude
Definition: MAGeometry.h:36
MACoordinateSpan span
跨度范围 Span range
Definition: MAGeometry.h:37
Definition: MAGeometry.h:28
CLLocationDegrees latitudeDelta
纬度跨度 Latitude span
Definition: MAGeometry.h:29
CLLocationDegrees longitudeDelta
经度跨度 Longitude span
Definition: MAGeometry.h:30
Definition: MAGeometry.h:42
double x
x坐标 x coordinate
Definition: MAGeometry.h:43
double y
y坐标 y coordinate
Definition: MAGeometry.h:44
Definition: MAGeometry.h:56
MAMapPoint origin
左上角坐标 Top-left corner coordinates
Definition: MAGeometry.h:57
MAMapSize size
大小 Size
Definition: MAGeometry.h:58
Definition: MAGeometry.h:49
double width
宽度 Width
Definition: MAGeometry.h:50
double height
高度 Height
Definition: MAGeometry.h:51