MBMMapSnapshotter.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. #import <CoreLocation/CoreLocation.h>
  4. #import <MapboxCoreMaps/MBMCameraManager.h>
  5. @class MBMMapSnapshotOptions;
  6. @class MBMSize;
  7. /** MapSnapshotter exposes functionality to capture static map images. */
  8. NS_SWIFT_NAME(MapSnapshotter)
  9. __attribute__((visibility ("default")))
  10. @interface MBMMapSnapshotter : MBMCameraManager
  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. /**
  16. * Construct a new snapshotter.
  17. *
  18. * @param options The `map snapshot options` to configure the snapshotter.
  19. */
  20. - (nonnull instancetype)initWithOptions:(nonnull MBMMapSnapshotOptions *)options;
  21. /**
  22. * Sets the `size` of the snapshot
  23. *
  24. * @param size The new `size` of the snapshot in `platform pixels`.
  25. */
  26. - (void)setSizeForSize:(nonnull MBMSize *)size;
  27. /**
  28. * Gets the size of the snapshot
  29. *
  30. * @return Snapshot `size` in `platform pixels`.
  31. */
  32. - (nonnull MBMSize *)getSize __attribute((ns_returns_retained));
  33. /**
  34. * Returns `true` if the snapshotter is in the tile mode.
  35. *
  36. * @return `true` if the snapshotter is in the tile mode, `false` otherwise.
  37. */
  38. - (BOOL)isInTileMode;
  39. /**
  40. * Sets the snapshotter to the tile mode.
  41. *
  42. * In the tile mode, the snapshotter fetches the still image of a single tile.
  43. *
  44. * @param set A `boolean` value representing if the snapshotter is in the tile mode.
  45. */
  46. - (void)setTileModeForSet:(BOOL)set;
  47. /**
  48. * Cancel the current snapshot operation.
  49. *
  50. * Cancel the current snapshot operation, if any. The callback passed to the start method
  51. * is called with error parameter set.
  52. */
  53. - (void)cancel;
  54. /**
  55. * Get elevation for the given coordinate.
  56. * Note: Elevation is only available for the visible region on the screen.
  57. *
  58. * @param coordinate defined as longitude-latitude pair.
  59. *
  60. * @return Elevation (in meters) multiplied by current terrain exaggeration, or empty if elevation for the coordinate is not available.
  61. */
  62. - (nullable NSNumber *)getElevationForCoordinate:(CLLocationCoordinate2D)coordinate __attribute((ns_returns_retained));
  63. @end