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.

86 lines
2.3 KiB

//
// AMapNearbySearchManager.h
// AMapSearchKit
//
// Created by xiaoming han on 15/8/31.
// Copyright (c) 2015年 Amap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AMapNearbyUploadInfo.h"
@class AMapNearbySearchManager;
///附近搜索代理
@protocol AMapNearbySearchManagerDelegate <NSObject>
@optional
/**
* @brief
*/
- (AMapNearbyUploadInfo *)nearbyInfoForUploading:(AMapNearbySearchManager *)manager;
/**
* @brief
* @param error
*/
- (void)onNearbyInfoUploadedWithError:(NSError *)error;
/**
* @brief
* @param error
*/
- (void)onUserInfoClearedWithError:(NSError *)error;
@end
///附近搜索管理类,同时只能有一个实例开启,否则可能会出现错误。
@interface AMapNearbySearchManager : NSObject
///上传最小间隔,默认15s,最小7s。自动上传的过程中设置无效。
@property (nonatomic, assign) NSTimeInterval uploadTimeInterval;
///代理对象。
@property (nonatomic, weak) id<AMapNearbySearchManagerDelegate> delegate;
///是否正在自动上传状态中。
@property (nonatomic, readonly) BOOL isAutoUploading;
/**
* @brief manager单例.
* key使.
* @return nearbySearch实例
*/
+ (instancetype)sharedInstance;
/**
* @brief 使
*/
- (instancetype)init __attribute__((unavailable));
/**
* @brief
*/
- (void)startAutoUploadNearbyInfo;
/**
* @brief
*/
- (void)stopAutoUploadNearbyInfo;
/**
* @brief uploadTimeInterval最小值
* @param info
* @return YESNO
*/
- (BOOL)uploadNearbyInfo:(AMapNearbyUploadInfo *)info __attribute((deprecated("已废弃 since 7.4.0,该功能不再支持")));
/**
* @brief
* @param userID ID
* @return YESNO
*/
- (BOOL)clearUserInfoWithID:(NSString *)userID __attribute((deprecated("已废弃 since 7.4.0,该功能不再支持")));
@end