MBXTileRegionLoadOptions.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <CoreLocation/CoreLocation.h>
  4. #import <MapboxCommon/MBXNetworkRestriction.h>
  5. @class MBXGeometry;
  6. @class MBXTilesetDescriptor;
  7. /** Describes the tile region load option values. */
  8. NS_SWIFT_NAME(TileRegionLoadOptions)
  9. __attribute__((visibility ("default")))
  10. @interface MBXTileRegionLoadOptions : NSObject
  11. // This class provides custom init which should be called
  12. - (nonnull instancetype)init NS_UNAVAILABLE;
  13. // This class provides custom init which should be called
  14. + (nonnull instancetype)new NS_UNAVAILABLE;
  15. - (nonnull instancetype)initWithGeometry:(nullable MBXGeometry *)geometry
  16. descriptors:(nullable NSArray<MBXTilesetDescriptor *> *)descriptors
  17. metadata:(nullable id)metadata
  18. startLocation:(nullable CLLocation *)startLocation
  19. averageBytesPerSecond:(nullable NSNumber *)averageBytesPerSecond
  20. extraOptions:(nullable id)extraOptions NS_REFINED_FOR_SWIFT;
  21. - (nonnull instancetype)initWithGeometry:(nullable MBXGeometry *)geometry
  22. descriptors:(nullable NSArray<MBXTilesetDescriptor *> *)descriptors
  23. metadata:(nullable id)metadata
  24. acceptExpired:(BOOL)acceptExpired
  25. networkRestriction:(MBXNetworkRestriction)networkRestriction
  26. startLocation:(nullable CLLocation *)startLocation
  27. averageBytesPerSecond:(nullable NSNumber *)averageBytesPerSecond
  28. extraOptions:(nullable id)extraOptions NS_REFINED_FOR_SWIFT;
  29. /**
  30. * The tile region's associated geometry.
  31. *
  32. * If provided, updates the tile region's associated geometry i.e. geometry,
  33. * which is used in the tile cover algorithm to find out a set of tiles to be loaded
  34. * for the tile region.
  35. */
  36. @property (nonatomic, readonly, nullable) MBXGeometry *geometry NS_REFINED_FOR_SWIFT;
  37. /**
  38. * The tile region's tileset descriptors.
  39. *
  40. * If provided, updates the tile region's tileset descriptors that define
  41. * the tilesets and zoom ranges of the tiles for the tile region.
  42. */
  43. @property (nonatomic, readonly, nullable, copy) NSArray<MBXTilesetDescriptor *> *descriptors;
  44. /**
  45. * A custom Mapbox Value associated with this tile region for storing metadata.
  46. *
  47. * If provided, the custom value value will be stored alongside the tile region. Previous values will
  48. * be replaced with the new value.
  49. *
  50. * Developers can use this field to store custom metadata associated with a tile region. This value
  51. * can be retrieved with getTileRegionMetadata().
  52. */
  53. @property (nonatomic, readonly, nullable, copy) id metadata;
  54. /**
  55. * Accepts expired data when loading tiles.
  56. *
  57. * This flag should be set to true to accept expired responses. When a tile is already loaded but expired, no
  58. * attempt will be made to refresh the data. This may lead to outdated data. Set to false to ensure that data
  59. * for a tile is up-to-date. Set to true to continue loading a group without updating expired data for tiles that
  60. * are already downloaded.
  61. */
  62. @property (nonatomic, readonly, getter=isAcceptExpired) BOOL acceptExpired;
  63. /**
  64. * Controls which networks may be used to load the tile.
  65. *
  66. * By default, all networks are allowed. However, in some situations, it's useful to limit the kind of networks
  67. * that are allowed, e.g. to ensure that data is only transferred over a connection that doesn't incur cost to
  68. * the user, like a WiFi connection, and prohibit data transfer over expensive connections like cellular.
  69. */
  70. @property (nonatomic, readonly) MBXNetworkRestriction networkRestriction;
  71. /**
  72. * Starts loading the tile region at the given location and then proceeds to tiles that are further away
  73. * from it.
  74. *
  75. * Note that this functionality is not currently implemented.
  76. */
  77. @property (nonatomic, readonly, nullable) CLLocation *startLocation NS_REFINED_FOR_SWIFT;
  78. /**
  79. * Limits the download speed of the tile region.
  80. *
  81. * Note that this is not a strict bandwidth limit, but only limits the average download speed. tile regions may
  82. * be temporarily downloaded with higher speed, then pause downloading until the rolling average has dropped below
  83. * this value.
  84. *
  85. * If unspecified, the download speed will not be restricted.
  86. *
  87. * Note that this functionality is not currently implemented.
  88. */
  89. @property (nonatomic, readonly, nullable) NSNumber *averageBytesPerSecond NS_REFINED_FOR_SWIFT;
  90. /**
  91. * Extra tile region load options.
  92. *
  93. * If provided, contains an object value with extra tile region load options.
  94. *
  95. * There are currently no extra options.
  96. */
  97. @property (nonatomic, readonly, nullable, copy) id extraOptions;
  98. @end