Files
MapLibreParticleLab/platform/darwin/include/NSValue+MGLAdditions.h
Minh Nguyễn 9c9ff2d2d4 [ios, osx] Updated build system for jazzy
Consolidated NSValue categories to work around realm/jazzy#539. Documented MGLErrorCode. Moved jazzy configuration file into platform/ios/. Removed redundant include/Mapbox.h that was only being used by jazzy, now that the static frameworks’s umbrella header is based on that of the dynamic framework. Moved framework/Mapbox.h to include/Mapbox.h for consistency.
2016-04-22 12:31:42 -07:00

76 lines
2.1 KiB
Objective-C

#import <Foundation/Foundation.h>
#import "MGLGeometry.h"
#import "MGLOfflinePack.h"
NS_ASSUME_NONNULL_BEGIN
/**
Methods for round-tripping values for Mapbox-defined types.
*/
@interface NSValue (MGLAdditions)
#pragma mark Working with Geographic Coordinate Values
/**
Creates a new value object containing the specified Core Location geographic
coordinate structure.
@param coordinate The value for the new object.
@return A new value object that contains the geographic coordinate information.
*/
+ (instancetype)valueWithMGLCoordinate:(CLLocationCoordinate2D)coordinate;
/**
The Core Location geographic coordinate structure representation of the value.
*/
@property (readonly) CLLocationCoordinate2D MGLCoordinateValue;
/**
Creates a new value object containing the specified Mapbox coordinate span
structure.
@param span The value for the new object.
@return A new value object that contains the coordinate span information.
*/
+ (instancetype)valueWithMGLCoordinateSpan:(MGLCoordinateSpan)span;
/**
The Mapbox coordinate span structure representation of the value.
*/
@property (readonly) MGLCoordinateSpan MGLCoordinateSpanValue;
/**
Creates a new value object containing the specified Mapbox coordinate bounds
structure.
@param bounds The value for the new object.
@return A new value object that contains the coordinate bounds information.
*/
+ (instancetype)valueWithMGLCoordinateBounds:(MGLCoordinateBounds)bounds;
/**
The Mapbox coordinate bounds structure representation of the value.
*/
@property (readonly) MGLCoordinateBounds MGLCoordinateBoundsValue;
#pragma mark Working with Offline Map Values
/**
Creates a new value object containing the given `MGLOfflinePackProgress`
structure.
@param progress The value for the new object.
@return A new value object that contains the offline pack progress information.
*/
+ (NSValue *)valueWithMGLOfflinePackProgress:(MGLOfflinePackProgress)progress;
/**
The `MGLOfflinePackProgress` structure representation of the value.
*/
@property (readonly) MGLOfflinePackProgress MGLOfflinePackProgressValue;
@end
NS_ASSUME_NONNULL_END