Files
MapLibreParticleLab/platform/darwin/include/MGLCoordinateFormatter.h
Minh Nguyễn 91023f02f8 [ios, osx] Coordinate formatter
Added a degree-minute-second coordinate formatter for general use. Use this formatter in iosapp and osxapp.

Added unit tests for the coordinate formatter and for round-tripping geometry types through NSValue.
2016-04-22 11:13:03 -07:00

32 lines
917 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "MGLTypes.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLCoordinateFormatter` class provides properly formatted descriptions of
geographic coordinate pairs. Use this class to create localized coordinate
strings when displaying location information to users.
*/
@interface MGLCoordinateFormatter : NSFormatter
/**
Returns a coordinate string for the provided value.
@param coordinate The coordinate’s value.
@return The coordinate string appropriately formatted for the formatter’s
locale.
*/
- (NSString *)stringFromCoordinate:(CLLocationCoordinate2D)coordinate;
/**
This method is not supported for the `MGLCoordinateFormatter` class.
*/
- (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error;
@end
NS_ASSUME_NONNULL_END