mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASMapNode] Toggle user interaction when liveMap changes (#1753)
[ASMapNode] Change map snapshot when updating it with a new region (#1754) [ASMapNode] Commented out code that is causing inaccurate behavior [ASMapNode] Added the ability to zoom in and show annotations, similar to showAnnotations:animated: of MKMapView. Added a basic example for ASMapNode to try out the different changes
This commit is contained in:
@@ -14,6 +14,16 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, ASMapNodeShowAnnotationsOptions)
|
||||
{
|
||||
/** The annotations' positions are ignored, use the region or options specified instead. */
|
||||
ASMapNodeShowAnnotationsOptionsIgnored = 0,
|
||||
/** The annotations' positions are used to calculate the region to show in the map, equivalent to showAnnotations:animated. */
|
||||
ASMapNodeShowAnnotationsOptionsZoomed = 1 << 0,
|
||||
/** This will only have an effect if combined with the Zoomed state with liveMap turned on.*/
|
||||
ASMapNodeShowAnnotationsOptionsAnimated = 1 << 1
|
||||
};
|
||||
|
||||
@interface ASMapNode : ASImageNode
|
||||
|
||||
/**
|
||||
@@ -54,6 +64,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@property (nonatomic, copy) NSArray<id<MKAnnotation>> *annotations;
|
||||
|
||||
/**
|
||||
* @abstract This property specifies how to show the annotations.
|
||||
* @default Default value is ASMapNodeShowAnnotationsIgnored
|
||||
*/
|
||||
@property (nonatomic, assign) ASMapNodeShowAnnotationsOptions showAnnotationsOptions;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user