mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-30 20:41:08 +00:00
20 lines
479 B
Objective-C
20 lines
479 B
Objective-C
//
|
|
// Copyright (c) 2016 Mapbox. All rights reserved.
|
|
//
|
|
|
|
#import "MGLPolyline+RCTAdditions.h"
|
|
|
|
|
|
@implementation MGLPolyline (RCTAdditions)
|
|
|
|
- (NSMutableArray *)coordinateArray
|
|
{
|
|
NSMutableArray *coordinates = [[NSMutableArray alloc] init];
|
|
for (int index = 0; index < self.pointCount; index++) {
|
|
CLLocationCoordinate2D coord = self.coordinates[index];
|
|
[coordinates addObject:@[@(coord.longitude), @(coord.latitude)]];
|
|
}
|
|
return coordinates;
|
|
}
|
|
|
|
@end |