MBMViewAnnotationOptions


@interface MBMViewAnnotationOptions : NSObject

Defines the necessary options for displaying view annotations.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    + (nonnull instancetype)new NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAnnotatedFeature:(nullable MBMAnnotatedFeature *)annotatedFeature
                                               width:(nullable NSNumber *)width
                                              height:(nullable NSNumber *)height
                                        allowOverlap:(nullable NSNumber *)allowOverlap
                                             visible:(nullable NSNumber *)visible
                                     variableAnchors:(nullable NSArray<MBMViewAnnotationAnchorConfig *> *)variableAnchors
                                            selected:(nullable NSNumber *)selected NS_REFINED_FOR_SWIFT;
  • Associates a view annotation with the geometry provided by the AnnotatedFeature. Note: When adding a new view annotation, you must specify the AnnotatedFeature type. Failure to do so will result in an error. When updating existing annotations,if the annotatedFeature is not set, the current value will be retained.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) MBMAnnotatedFeature *annotatedFeature;

    Swift

    var annotatedFeature: MBMAnnotatedFeature? { get }
  • View annotation width in platform pixels.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *width;
  • View annotation height in platform pixels.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *height;
  • If true, the annotation will be visible even if it collides with other previously drawn annotations.

    When adding new annotations, if allowOverlap is not explicitly set, default value false will be applied. When updating existing annotations, if allowOverlap is not explicitly set, the current value will be retained.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *allowOverlap;
  • Specifies if this view annotation is visible or not.

    Note: For Android and iOS platforms, if this property is not specified explicitly when creating / updating view annotation, visibility will be handled automatically based on actual Android or iOS view’s visibility e.g. if actual view is set to be not visible - Android / iOS part will automatically update view annotation to have visible = false.

    When adding new annotations, if visible is not explicitly set, default value true will be applied. When updating existing annotations, if visible is not explicitly set, the current value will be retained.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *visible;
  • Provide anchor choices for annotation placement. The first anchor in the list that allows the view annotation to be placed in the view is picked. If the array is empty, the default ViewAnnotationAnchorConfig value will be applied.

    When adding new annotations, if variableAnchor is not explicitly set, the default ViewAnnotationAnchorConfig value will be applied. When updating existing annotations, if variableAnchor is not explicitly set, the current value will be retained.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSArray<MBMViewAnnotationAnchorConfig *> *variableAnchors;

    Swift

    var variableAnchors: [MBMViewAnnotationAnchorConfig]? { get }
  • Specifies if this view annotation is selected meaning it should be placed on top of others.

    When adding new annotations, if selected is not explicitly set, default value false will be applied. When updating existing annotations, if selected is not explicitly set, the current value will be retained.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *selected;