diff options
Diffstat (limited to 'platform/darwin/src/NSArray+MGLAdditions.h')
-rw-r--r-- | platform/darwin/src/NSArray+MGLAdditions.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/darwin/src/NSArray+MGLAdditions.h b/platform/darwin/src/NSArray+MGLAdditions.h index eb1cfb7c47..c4dfd8207b 100644 --- a/platform/darwin/src/NSArray+MGLAdditions.h +++ b/platform/darwin/src/NSArray+MGLAdditions.h @@ -1,4 +1,5 @@ #import <Foundation/Foundation.h> +#import <CoreLocation/CoreLocation.h> #import <mbgl/util/feature.hpp> @@ -9,4 +10,18 @@ /** Returns a string resulting from inserting a separator between each attributed string in the array */ - (NSAttributedString *)mgl_attributedComponentsJoinedByString:(NSString *)separator; +/** + Converts std::vector<CLLocationCoordinate> into an NSArray containing dictionary + representations of coordinates with the following structure: + [{"latitude": lat, "longitude": lng}] + */ ++ (NSArray *)mgl_coordinatesFromCoordinates:(std::vector<CLLocationCoordinate2D>)coords; + +/** + Converts the receiver into a std::vector<CLLocationCoordinate>. + Receiver must conform to the following structure: + [{"latitude": lat, "longitude": lng}] + */ +- (std::vector<CLLocationCoordinate2D>)mgl_coordinates; + @end |