高德地图SDK(导航) V10.0.900
Loading...
Searching...
No Matches
MAPolygon Class Reference

此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonView的model More...

#import <MAPolygon.h>

Inheritance diagram for MAPolygon:
MAMultiPoint <MAOverlay> MAShape <MAAnnotation> MABaseOverlay <MAOverlay> <MAAnnotation>

Instance Methods

(BOOL) - setPolygonWithPoints:count:
 重新设置多边形顶点. since 5.0.0
 
(BOOL) - setPolygonWithCoordinates:count:
 重新设置多边形顶点. since 5.0.0
 
- Instance Methods inherited from MAMultiPoint
(void) - getCoordinates:range:
 将内部的坐标点数据转化为经纬度坐标并拷贝到coords内存中
 
- Instance Methods inherited from <MAOverlay>
(CLLocationCoordinate2D) - coordinate
 返回区域中心坐标
 
(MAMapRect- boundingMapRect
 区域外接矩形
 
- Instance Methods inherited from <MAAnnotation>
(void) - setCoordinate:
 设置标注的坐标,在拖拽时会被调用.
 

Class Methods

(instancetype) + polygonWithCoordinates:count:
 根据经纬度坐标数据生成闭合多边形
 
(instancetype) + polygonWithPoints:count:
 根据map point数据生成多边形
 

Properties

NSArray< id< MAOverlay > > * hollowShapes
 设置中空区域,用来创建中间带空洞的复杂图形。注意:传入的overlay只支持MAPolgon类型和MACircle类型,不支持与polygon边相交或在polygon外部,不支持hollowShapes彼此间相交,和空洞顺序有关,不支持嵌套. since 5.5.0
 
- Properties inherited from MAMultiPoint
MAMapPointpoints
 坐标点数组
 
NSUInteger pointCount
 坐标点的个数
 
BOOL cross180Longitude
 是否跨越180度经度线,默认NO since 6.4.0
 
- Properties inherited from MAShape
NSString * title
 标题
 
NSString * subtitle
 副标题
 
- Properties inherited from MABaseOverlay
CLLocationCoordinate2D coordinate
 返回区域中心坐标
 
MAMapRect boundingMapRect
 区域外接矩形
 
double altitude
 海拔,单位米,默认0
 
- Properties inherited from <MAAnnotation>
CLLocationCoordinate2D coordinate
 标注view中心坐标
 
NSString * title
 annotation标题
 
NSString * subtitle
 annotation副标题
 
double altitude
 annotation海拔高度,单位米,默认0
 

Additional Inherited Members

- Protected Attributes inherited from MAShape
NSString * _title
 标题
 
NSString * _subtitle
 副标题
 
- Protected Attributes inherited from MABaseOverlay
double _altitude
 海拔
 

Detailed Description

此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonView的model

Method Documentation

◆ polygonWithCoordinates:count:

+ (instancetype) polygonWithCoordinates: (CLLocationCoordinate2D *)  coords
count: (NSUInteger)  count 

根据经纬度坐标数据生成闭合多边形

Parameters
coords经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放
count经纬度坐标点数组个数
Returns
新生成的多边形

◆ polygonWithPoints:count:

+ (instancetype) polygonWithPoints: (MAMapPoint *)  points
count: (NSUInteger)  count 

根据map point数据生成多边形

Parameters
pointsmap point数据,points对应的内存会拷贝,调用者负责该内存的释放
count点的个数
Returns
新生成的多边形

◆ setPolygonWithCoordinates:count:

- (BOOL) setPolygonWithCoordinates: (CLLocationCoordinate2D *)  coords
count: (NSInteger)  count 

重新设置多边形顶点. since 5.0.0

Parameters
coords指定的经纬度坐标点数组, C数组,内部会做copy,调用者负责内存管理
count坐标点的个数
Returns
是否设置成功

◆ setPolygonWithPoints:count:

- (BOOL) setPolygonWithPoints: (MAMapPoint *)  points
count: (NSInteger)  count 

重新设置多边形顶点. since 5.0.0

Parameters
points指定的直角坐标点数组, C数组,内部会做copy,调用者负责内存管理
count坐标点的个数
Returns
是否设置成功

Property Documentation

◆ hollowShapes

- (NSArray<id<MAOverlay> >*) hollowShapes
readwritenonatomicstrong

设置中空区域,用来创建中间带空洞的复杂图形。注意:传入的overlay只支持MAPolgon类型和MACircle类型,不支持与polygon边相交或在polygon外部,不支持hollowShapes彼此间相交,和空洞顺序有关,不支持嵌套. since 5.5.0


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。