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.

74 lines
2.4 KiB

//
// MAGroundOverlay.h
// MapKit_static
//
// Created by Li Fei on 11/12/13.
// Copyright © 2016 Amap. All rights reserved.
//
#import "MAConfig.h"
#if MA_INCLUDE_OVERLAY_GROUND
#import <UIKit/UIKit.h>
#import "MAShape.h"
#import "MAOverlay.h"
///该类用于确定覆盖在地图上的图片,及其覆盖区域, 通常MAGroundOverlay是MAGroundOverlayRenderer的model
@interface MAGroundOverlay : MAShape<MAOverlay>
///绘制在地图上的覆盖图片
@property (nonatomic, readonly) UIImage *icon;
///透明度. 最终透明度 = 纹理透明度 * alpha. 有效范围为[0.f, 1.f], 默认为1.f
@property (nonatomic, assign) CGFloat alpha;
///覆盖图片在地图尺寸等同于其像素的zoom值
@property (nonatomic, readonly) CGFloat zoomLevel;
///图片在地图中的覆盖范围
@property (nonatomic, readonly) MACoordinateBounds bounds;
/**
* @brief bounds值和icon生成GroundOverlay
* @param bounds
* @param icon
* @return bounds和icon GroundOverlay
*/
+ (instancetype)groundOverlayWithBounds:(MACoordinateBounds)bounds
icon:(UIImage *)icon;
/**
* @brief coordinate,icon,zoomLevel生成GroundOverlay
* @param coordinate
* @param zoomLevel zoom值
* @param icon
* @return coordinate,icon,zoomLevel GroundOverlay
*/
+ (instancetype)groundOverlayWithCoordinate:(CLLocationCoordinate2D)coordinate
zoomLevel:(CGFloat)zoomLevel
icon:(UIImage *)icon;
/**
* @brief GroundOverlay. since 5.0.0
* @param bounds
* @param icon
* @return
*/
- (BOOL)setGroundOverlayWithBounds:(MACoordinateBounds)bounds icon:(UIImage *)icon;
/**
* @brief GroundOverlay, zoomLevel下显示大小为icon大小. since 5.0.0
* @param coordinate
* @param zoomLevel zoom值
* @param icon
* @return
*/
- (BOOL)setGroundOverlayWithCoordinate:(CLLocationCoordinate2D)coordinate
zoomLevel:(CGFloat)zoomLevel
icon:(UIImage *)icon;
@end
#endif