iOS高德地图SDK(3D) V11.2.0001

Instance Methods | Class Methods | Properties | List of all members
MAPolygon Class Reference

`#import <MAPolygon.h>`

Inheritance diagram for MAPolygon:

## Instance Methods
(BOOL) | - setPolygonWithPoints:count:
| 重新设置多边形顶点. since 5.0.0 Reset polygon vertices. since 5.0.0 More...
(BOOL) | - setPolygonWithCoordinates:count:
| 重新设置多边形顶点. since 5.0.0 Reset polygon vertices. since 5.0.0 More...
Instance Methods inherited from MAMultiPoint
(void) | - getCoordinates:range:
| 将内部的坐标点数据转化为经纬度坐标并拷贝到coords内存中 Convert the internal coordinate point data into latitude and longitude coordinates and copy them to the coords memory More...
Instance Methods inherited from <MAOverlay>
(CLLocationCoordinate2D) | - coordinate
(MAMapRect) | - boundingMapRect
Instance Methods inherited from <MAAnnotation>
(void) | - setCoordinate:
| 设置标注的坐标，在拖拽时会被调用. Set the coordinates of the annotation, which will be called during dragging More...

## Class Methods
(instancetype) | + polygonWithCoordinates:count:
| 根据经纬度坐标数据生成闭合多边形 Generate a closed polygon based on latitude and longitude coordinate data More...
(instancetype) | + polygonWithPoints:count:
| 根据map point数据生成多边形 Generate polygon based on map point data More...

## Properties
NSArray< id< MAOverlay > > * | hollowShapes
Properties inherited from MAMultiPoint
MAMapPoint * | points
NSUInteger | pointCount
BOOL | cross180Longitude
Properties inherited from MAShape
NSString * | title
| 标题 Title More...
NSString * | subtitle
| 副标题 Subtitle More...
Properties inherited from MABaseOverlay
CLLocationCoordinate2D | coordinate
MAMapRect | boundingMapRect
double | altitude
Properties inherited from <MAAnnotation>
NSString * | title
NSString * | subtitle
double | altitude

## Additional Inherited Members
Protected Attributes inherited from MAShape
NSString * | _title
| 标题 Title More...
NSString * | _subtitle
| 副标题 Subtitle More...
Protected Attributes inherited from MABaseOverlay
double | _altitude
| 海拔 Elevation More...

## Detailed Description

此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonView的model This class is used to define a closed polygon composed of multiple points, where the points are connected sequentially from tail to head, and the first point is connected to the last point. Typically, MAPolygon is the model of MAPolygonView.

## Method Documentation

## ◆ polygonWithCoordinates:count:

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

根据经纬度坐标数据生成闭合多边形 Generate a closed polygon based on latitude and longitude coordinate data

Parameters

  coords | 经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放 The memory corresponding to the latitude and longitude coordinate points, coords, will be copied, and the caller is responsible for releasing this memory
  count | 经纬度坐标点数组个数 The number of latitude and longitude coordinate point arrays

Returns
  新生成的多边形 Newly generated polygon

## ◆ polygonWithPoints:count:

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

根据map point数据生成多边形 Generate polygon based on map point data

Parameters

  points | map point数据,points对应的内存会拷贝,调用者负责该内存的释放 map point data, the memory corresponding to points will be copied, the caller is responsible for releasing this memory
  count | 点的个数 number of points

Returns
  新生成的多边形 Newly generated polygon

## ◆ setPolygonWithCoordinates:count:

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

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

Parameters

  coords | 指定的经纬度坐标点数组, C数组，内部会做copy，调用者负责内存管理 specified latitude and longitude coordinate point array, C array, internal copy will be made, caller is responsible for memory management
  count | 坐标点的个数 number of coordinate points

Returns
  是否设置成功 whether the setup was successful

## ◆ setPolygonWithPoints:count:

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

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

Parameters

  points | 指定的直角坐标点数组, C数组，内部会做copy，调用者负责内存管理 specified rectangular coordinate point array, C array, internal copy will be made, caller is responsible for memory management
  count | 坐标点的个数 number of coordinate points

Returns
  是否设置成功 whether the setup was successful

## Property Documentation

## ◆ hollowShapes

- (NSArray<id<MAOverlay> >*) hollowShapes
| read write nonatomic strong

设置中空区域，用来创建中间带空洞的复杂图形。注意：传入的overlay只支持MAPolgon类型和MACircle类型,不支持与polygon边相交或在polygon外部,不支持hollowShapes彼此间相交,和空洞顺序有关,不支持嵌套. since 5.5.0 Set the hollow area to create complex shapes with holes in the middle. Note: The incoming overlay only supports MAPolgon type and MACircle type. Intersection with polygon edges or being outside the polygon is not supported, intersection between hollowShapes is not supported, it is related to the order of holes, nesting is not supported. since 5.5.0

The documentation for this class was generated from the following file:

- MAPolygon.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。