mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
[ASMapNode] Add custom pin annotation for static maps (#1890)
* Adds possibility to have custom annotation pins on static map. This resolves #1889. * Removes wrong example for map annotations and adds some annotations to correct map example. #1889 * Static map node now uses specific property block to get annotation views. * Changes self to strongSelf inside of the snapshotters completion block. * MapNode: Adds statement in documentation. * MapNode: Block for annotation view/image now returns UIImage and center offset is returned in inout param. * MapNode and map example: Fixes from review. * MapNode example: Gets image directly from custom annotation, without creating annotation view.
This commit is contained in:
committed by
Adlai Holler
parent
c0be871812
commit
873bae2eed
@@ -70,6 +70,12 @@ typedef NS_OPTIONS(NSUInteger, ASMapNodeShowAnnotationsOptions)
|
||||
*/
|
||||
@property (nonatomic, assign) ASMapNodeShowAnnotationsOptions showAnnotationsOptions;
|
||||
|
||||
/**
|
||||
* @abstract The block which should return annotation image for static map based on provided annotation.
|
||||
* @discussion This block is executed on an arbitrary serial queue. If this block is nil, standard pin is used.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) UIImage * _Nullable (^imageForStaticMapAnnotationBlock)(id<MKAnnotation> annotation, CGPoint *centerOffset);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user