ASMapNode Class Reference

Inherits from ASImageNode : ASControlNode : ASDisplayNode : ASDealloc2MainObject
Declared in ASMapNode.h

  options

The current options of ASMapNode. This can be set at any time and ASMapNode will animate the change.

This property may be set from a background thread before the node is loaded, and will automatically be applied to define the behavior of the static snapshot (if .liveMap = NO) or the internal MKMapView (otherwise).

Changes to the region and camera options will only be animated when when the liveMap mode is enabled, otherwise these options will be applied statically to the new snapshot.

The options object is used to specify properties even when the liveMap mode is enabled, allowing seamless transitions between the snapshot and liveMap (as well as back to the snapshot).

@property (nonatomic, strong) MKMapSnapshotOptions *options

Declared In

ASMapNode.h

  region

The region is simply the sub-field on the options object. If the objects object is reset, this will in effect be overwritten and become the value of the .region property on that object. Defaults to MKCoordinateRegionForMapRect(MKMapRectWorld).

@property (nonatomic, assign) MKCoordinateRegion region

Declared In

ASMapNode.h

  mapView

This is the MKMapView that is the live map part of ASMapNode. This will be nil if .liveMap = NO. Note, MKMapView is not thread-safe.

@property (nullable, nonatomic, readonly) MKMapView *mapView

Declared In

ASMapNode.h

  liveMap

Set this to YES to turn the snapshot into an interactive MKMapView and vice versa. Defaults to NO. This property may be set on a background thread before the node is loaded, and will automatically be actioned, once the node is loaded.

@property (nonatomic, assign, getter=isLiveMap) BOOL liveMap

Declared In

ASMapNode.h

  needsMapReloadOnBoundsChange

Whether ASMapNode should automatically request a new map snapshot to correspond to the new node size. @default Default value is YES.

@property (nonatomic, assign) BOOL needsMapReloadOnBoundsChange

Discussion

If mapSize is set then this will be set to NO, since the size will be the same in all orientations.

Declared In

ASMapNode.h

  mapDelegate

Set the delegate of the MKMapView. This can be set even before mapView is created and will be set on the map in the case that the liveMap mode is engaged.

@property (nonatomic, weak) id<MKMapViewDelegate> mapDelegate

Declared In

ASMapNode.h

  annotations

The annotations to display on the map.

@property (nonatomic, copy) NSArray<id<MKAnnotation> > *annotations

Declared In

ASMapNode.h

  showAnnotationsOptions

This property specifies how to show the annotations. @default Default value is ASMapNodeShowAnnotationsIgnored

@property (nonatomic, assign) ASMapNodeShowAnnotationsOptions showAnnotationsOptions

Declared In

ASMapNode.h

  imageForStaticMapAnnotationBlock

The block which should return annotation image for static map based on provided annotation.

@property (nonatomic, copy, nullable) UIImage *( ^ ) ( id<MKAnnotation> annotation , CGPoint *centerOffset ) imageForStaticMapAnnotationBlock

Discussion

This block is executed on an arbitrary serial queue. If this block is nil, standard pin is used.

Declared In

ASMapNode.h