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.

55 lines
1.7 KiB

//
// MAMapSnapshot.h
// MAMapKit
//
// Created by ZhaoRui on 2022/3/30.
// Copyright © 2022 Amap. All rights reserved.
//
#import "MAMapKit/MAMapKit.h"
@interface MAMapSnapshotModel : NSObject
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint position;
@property (nonatomic, assign) MAMapPoint tlPoint;
@property (nonatomic, assign) MAMapPoint trPoint;
@property (nonatomic, strong) UIImage* image;
@end
@interface MAMapSnapshot : NSObject
@property (nonatomic, readonly) CGSize minSize;
@property (nonatomic, readonly) CGSize maxSize;
- (instancetype)init:(MAMapView*)mapview;
/**
* @brief (annotationView),
* @param size
* @param tl
* @param tr
* @param block block(resultImages:,state01
*/
typedef void(^CaptureResultBlock)(NSArray<MAMapSnapshotModel*> *resultImages, NSInteger state);
- (BOOL)captureBigPicture:(CGSize)pixelSize
topLeft:(CLLocationCoordinate2D)tl
topRight:(CLLocationCoordinate2D)tr
complete:(CaptureResultBlock)block;
/**
* @brief (annotationView),
* @param size
* @param tl
* @param tr
* @param block block(resultImage:,state01
*/
typedef void(^Observer)(UIImage *resultImage, NSInteger state);
- (BOOL)capture:(CGSize)size
topLeft:(CLLocationCoordinate2D)tl
topRight:(CLLocationCoordinate2D)tr
complete:(Observer)block;
@end