MAPolygon.h
2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// MAPolygon.h
// MAMapKit
//
// Created by AutoNavi.
// Copyright (c) 2013年 Amap. All rights reserved.
//
#import "MAMultiPoint.h"
#import "MAOverlay.h"
///此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonRenderer的model
@interface MAPolygon : MAMultiPoint <MAOverlay>
///内嵌MAPolygon数组,在生成的多边形中将会裁减掉内嵌polygon包含的区域
@property (readonly) NSArray *interiorPolygons;
/**
* @brief 根据map point数据生成多边形
* @param points mapPoint数据,points对应的内存会拷贝,调用者负责该内存的释放
* @param count 点的个数
* @return 新生成的多边形
*/
+ (instancetype)polygonWithPoints:(MAMapPoint *)points count:(NSUInteger)count;
/**
* @brief 根据map point数据和interior polygons生成多边形
* @param points mapPoint数据,points对应的内存会拷贝,调用者负责该内存的释放
* @param count 点的个数
* @param interiorPolygons MAPolygon数组,指定在生成的多边形中需要裁剪掉的区域
* @return 新生成的多边形
*/
+ (instancetype)polygonWithPoints:(MAMapPoint *)points count:(NSUInteger)count interiorPolygons:(NSArray *)interiorPolygons;
/**
* @brief 根据经纬度坐标数据生成闭合多边形
* @param coords 经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放
* @param count 经纬度坐标点数组个数
* @return 新生成的多边形
*/
+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count;
/**
* @brief 根据经纬度坐标数据和interior polygons生成闭合多边形
* @param coords 经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放
* @param count 经纬度坐标点数组个数
* @param interiorPolygons MAPolygon数组,指定在生成的多边形中需要裁剪掉的区域
* @return 新生成的多边形
*/
+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count interiorPolygons:(NSArray *)interiorPolygons;
@end