MBMViewAnnotationOptions.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <MapboxCoreMaps/MBMViewAnnotationAnchor.h>
  4. @class MBXGeometry;
  5. /** Various options needed for displaying view annotation. */
  6. NS_SWIFT_NAME(ViewAnnotationOptions)
  7. __attribute__((visibility ("default")))
  8. @interface MBMViewAnnotationOptions : NSObject
  9. // This class provides custom init which should be called
  10. - (nonnull instancetype)init NS_UNAVAILABLE;
  11. // This class provides custom init which should be called
  12. + (nonnull instancetype)new NS_UNAVAILABLE;
  13. - (nonnull instancetype)initWithGeometry:(nullable MBXGeometry *)geometry
  14. associatedFeatureId:(nullable NSString *)associatedFeatureId
  15. width:(nullable NSNumber *)width
  16. height:(nullable NSNumber *)height
  17. allowOverlap:(nullable NSNumber *)allowOverlap
  18. visible:(nullable NSNumber *)visible
  19. anchor:(nullable NSNumber *)anchor
  20. offsetX:(nullable NSNumber *)offsetX
  21. offsetY:(nullable NSNumber *)offsetY
  22. selected:(nullable NSNumber *)selected NS_REFINED_FOR_SWIFT;
  23. /**
  24. * Geometry the view annotation is bound to. Currently only support 'point' geometry type.
  25. * Note: geometry must be set when adding a new view annotation, otherwise an operation error will be returned from the call that is associated to this option.
  26. */
  27. @property (nonatomic, readonly, nullable) MBXGeometry *geometry NS_REFINED_FOR_SWIFT;
  28. /**
  29. * Optional style symbol id connected to given view annotation.
  30. *
  31. * View annotation's visibility behaviour becomes tied to feature visibility where feature could represent an icon or a text label.
  32. * E.g. if the bounded symbol is not visible view annotation also becomes not visible.
  33. *
  34. * Note: Invalid associatedFeatureId (meaning no actual symbol has such feature id) will lead to the corresponding annotation to be invisible.
  35. */
  36. @property (nonatomic, readonly, nullable, copy) NSString *associatedFeatureId NS_REFINED_FOR_SWIFT;
  37. /** View annotation width in `platform pixels`. */
  38. @property (nonatomic, readonly, nullable) NSNumber *width NS_REFINED_FOR_SWIFT;
  39. /** View annotation height in `platform pixels`. */
  40. @property (nonatomic, readonly, nullable) NSNumber *height NS_REFINED_FOR_SWIFT;
  41. /**
  42. * If true, the annotation will be visible even if it collides with other previously drawn annotations.
  43. * If allowOverlap is null, default value `false` will be applied.
  44. */
  45. @property (nonatomic, readonly, nullable) NSNumber *allowOverlap NS_REFINED_FOR_SWIFT;
  46. /**
  47. * Specifies if this view annotation is visible or not.
  48. *
  49. * Note: For Android and iOS platforms, if this property is not specified explicitly when creating / updating view annotation, visibility will be
  50. * 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
  51. * will automatically update view annotation to have `visible = false`.
  52. *
  53. * If visible is null, default value `true` will be applied.
  54. */
  55. @property (nonatomic, readonly, nullable) NSNumber *visible NS_REFINED_FOR_SWIFT;
  56. /**
  57. * Anchor describing where the view annotation will be located relatively to given geometry.
  58. * If anchor is null, default value `CENTER` will be applied.
  59. */
  60. @property (nonatomic, readonly, nullable) NSNumber *anchor NS_REFINED_FOR_SWIFT;
  61. /**
  62. * Extra X offset in `platform pixels`.
  63. * Providing positive value moves view annotation to the right while negative moves it to the left.
  64. */
  65. @property (nonatomic, readonly, nullable) NSNumber *offsetX NS_REFINED_FOR_SWIFT;
  66. /**
  67. * Extra Y offset in `platform pixels`.
  68. * Providing positive value moves view annotation to the top while negative moves it to the bottom.
  69. */
  70. @property (nonatomic, readonly, nullable) NSNumber *offsetY NS_REFINED_FOR_SWIFT;
  71. /**
  72. * Specifies if this view annotation is selected meaning it should be placed on top of others.
  73. * If selected in null, default value `false` will be applied.
  74. */
  75. @property (nonatomic, readonly, nullable) NSNumber *selected NS_REFINED_FOR_SWIFT;
  76. @end