[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:
George A
2016-06-21 16:13:55 +02:00
parent 21d0f1e10d
commit 83d610cd54
15 changed files with 1108 additions and 9 deletions

View File

@@ -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