You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.0 KiB

//
// MAPolygon.h
// MAMapKit
//
// Copyright (c) 2011年 Amap. All rights reserved.
//
#import "MAConfig.h"
#import <Foundation/Foundation.h>
#import "MAMultiPoint.h"
#import "MAOverlay.h"
///此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonView的model
@interface MAPolygon : MAMultiPoint <MAOverlay>
///设置中空区域,用来创建中间带空洞的复杂图形。注意:传入的overlay只支持MAPolgon类型和MACircle类型,不支持与polygon边相交或在polygon外部,不支持hollowShapes彼此间相交,和空洞顺序有关,不支持嵌套. since 5.5.0
@property (nonatomic, strong) NSArray<id<MAOverlay>> *hollowShapes;
/**
* @brief
* @param coords ,coords对应的内存会拷贝,
* @param count
* @return
*/
+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count;
/**
* @brief map point数据生成多边形
* @param points map point数据,points对应的内存会拷贝,
* @param count
* @return
*/
+ (instancetype)polygonWithPoints:(MAMapPoint *)points count:(NSUInteger)count;
/**
* @brief . since 5.0.0
* @param points , C数组copy
* @param count
* @return
*/
- (BOOL)setPolygonWithPoints:(MAMapPoint *)points count:(NSInteger)count;
/**
* @brief . since 5.0.0
* @param coords , C数组copy
* @param count
* @return
*/
- (BOOL)setPolygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSInteger)count;
@end