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.

91 lines
2.7 KiB

//
// AMapLocationRegionObj.h
// AMapLocationKit
//
// Created by AutoNavi on 15/11/27.
// Copyright © 2015年 Amap. All rights reserved.
//
#import "AMapLocationCommonObj.h"
// 以下类涉及的坐标需要使用高德坐标系坐标(GCJ02)
#pragma mark - AMapLocationRegion
///AMapLocationRegion类,该类提供范围类的基本信息,并无具体实现,不要直接使用。
@interface AMapLocationRegion : NSObject<NSCopying>
///AMapLocationRegion的identifier
@property (nonatomic, copy, readonly) NSString *identifier;
///当进入region范围时是否通知,默认YES
@property (nonatomic, assign) BOOL notifyOnEntry;
///当离开region范围时是否通知,默认YES
@property (nonatomic, assign) BOOL notifyOnExit;
/**
* @brief
* @param identifier nil
*/
- (instancetype)initWithIdentifier:(NSString *)identifier;
/**
* @brief
* @param coordinate
* @return
*/
- (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate;
@end
#pragma mark - AMapLocationCircleRegion
///AMapLocationCircleRegion类,定义一个圆形范围。
@interface AMapLocationCircleRegion : AMapLocationRegion
///中心点的经纬度坐标
@property (nonatomic, readonly) CLLocationCoordinate2D center;
///半径,单位:米
@property (nonatomic, readonly) CLLocationDistance radius;
/**
* @brief
* @param center
* @param radius
* @param identifier nil
* @return AMapLocationCircleRegion类实例
*/
- (instancetype)initWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString *)identifier;
@end
#pragma mark - AMapLocationPolygonRegion
///AMapLocationCircleRegion类,定义一个闭合多边形范围,点与点之间按顺序尾部相连, 第一个点与最后一个点相连。
@interface AMapLocationPolygonRegion : AMapLocationRegion
///经纬度坐标点数据
@property (nonatomic, readonly) CLLocationCoordinate2D *coordinates;
///经纬度坐标点的个数
@property (nonatomic, readonly) NSInteger count;
/**
* @brief
* @param coordinates ,coordinates对应的内存会拷贝,
* @param count 3
* @param identifier nil
* @return AMapLocationCircleRegion类实例
*/
- (instancetype)initWithCoordinates:(CLLocationCoordinate2D *)coordinates count:(NSInteger)count identifier:(NSString *)identifier;
@end