@maplibre/maplibre-react-native 10.1.0 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/ios/MLRN/CameraStop.h +1 -1
  2. package/ios/MLRN/CameraStop.m +58 -60
  3. package/ios/MLRN/CameraUpdateItem.h +2 -1
  4. package/ios/MLRN/CameraUpdateItem.m +132 -132
  5. package/ios/MLRN/CameraUpdateQueue.m +43 -47
  6. package/ios/MLRN/FilterParser.h +1 -1
  7. package/ios/MLRN/FilterParser.m +5 -6
  8. package/ios/MLRN/MLRNBackgroundLayer.m +10 -9
  9. package/ios/MLRN/MLRNBackgroundLayerManager.m +4 -5
  10. package/ios/MLRN/MLRNCallout.h +1 -1
  11. package/ios/MLRN/MLRNCallout.m +37 -36
  12. package/ios/MLRN/MLRNCalloutManager.m +2 -3
  13. package/ios/MLRN/MLRNCamera.h +1 -1
  14. package/ios/MLRN/MLRNCamera.m +169 -182
  15. package/ios/MLRN/MLRNCameraManager.m +4 -6
  16. package/ios/MLRN/MLRNCircleLayer.m +17 -14
  17. package/ios/MLRN/MLRNCircleLayerManager.m +4 -5
  18. package/ios/MLRN/MLRNCustomHeaders.h +2 -2
  19. package/ios/MLRN/MLRNCustomHeaders.m +63 -63
  20. package/ios/MLRN/MLRNEvent.h +3 -3
  21. package/ios/MLRN/MLRNEvent.m +19 -24
  22. package/ios/MLRN/MLRNEventProtocol.h +1 -1
  23. package/ios/MLRN/MLRNFillExtrusionLayer.m +18 -14
  24. package/ios/MLRN/MLRNFillExtrusionLayerManager.m +4 -5
  25. package/ios/MLRN/MLRNFillLayer.m +16 -14
  26. package/ios/MLRN/MLRNFillLayerManager.m +4 -5
  27. package/ios/MLRN/MLRNHeatmapLayer.m +17 -14
  28. package/ios/MLRN/MLRNHeatmapLayerManager.m +4 -5
  29. package/ios/MLRN/MLRNImageQueue.h +4 -1
  30. package/ios/MLRN/MLRNImageQueue.m +29 -32
  31. package/ios/MLRN/MLRNImageQueueOperation.h +1 -1
  32. package/ios/MLRN/MLRNImageQueueOperation.m +92 -91
  33. package/ios/MLRN/MLRNImageSource.m +36 -38
  34. package/ios/MLRN/MLRNImageSourceManager.m +2 -3
  35. package/ios/MLRN/MLRNImageUtils.h +3 -3
  36. package/ios/MLRN/MLRNImageUtils.m +15 -14
  37. package/ios/MLRN/MLRNImages.h +0 -1
  38. package/ios/MLRN/MLRNImages.m +89 -91
  39. package/ios/MLRN/MLRNImagesManager.m +4 -5
  40. package/ios/MLRN/MLRNLayer.h +9 -11
  41. package/ios/MLRN/MLRNLayer.m +170 -182
  42. package/ios/MLRN/MLRNLight.m +21 -23
  43. package/ios/MLRN/MLRNLightManager.m +2 -3
  44. package/ios/MLRN/MLRNLineLayer.m +17 -15
  45. package/ios/MLRN/MLRNLineLayerManager.m +4 -6
  46. package/ios/MLRN/MLRNLocation.h +1 -1
  47. package/ios/MLRN/MLRNLocation.m +16 -17
  48. package/ios/MLRN/MLRNLocationManager.m +109 -124
  49. package/ios/MLRN/MLRNLocationManagerDelegate.h +3 -3
  50. package/ios/MLRN/MLRNLocationModule.h +1 -1
  51. package/ios/MLRN/MLRNLocationModule.m +40 -55
  52. package/ios/MLRN/MLRNLogging.h +1 -4
  53. package/ios/MLRN/MLRNLogging.m +84 -89
  54. package/ios/MLRN/MLRNMapTouchEvent.h +2 -2
  55. package/ios/MLRN/MLRNMapTouchEvent.m +50 -49
  56. package/ios/MLRN/MLRNMapView.h +43 -36
  57. package/ios/MLRN/MLRNMapView.m +409 -440
  58. package/ios/MLRN/MLRNMapViewManager.m +489 -502
  59. package/ios/MLRN/MLRNModule.h +1 -1
  60. package/ios/MLRN/MLRNModule.m +111 -105
  61. package/ios/MLRN/MLRNNativeUserLocation.m +24 -27
  62. package/ios/MLRN/MLRNNativeUserLocationManager.m +4 -8
  63. package/ios/MLRN/MLRNOfflineModule.h +1 -1
  64. package/ios/MLRN/MLRNOfflineModule.m +416 -421
  65. package/ios/MLRN/MLRNPointAnnotation.h +2 -2
  66. package/ios/MLRN/MLRNPointAnnotation.m +154 -175
  67. package/ios/MLRN/MLRNPointAnnotationManager.m +2 -3
  68. package/ios/MLRN/MLRNRasterLayer.m +16 -12
  69. package/ios/MLRN/MLRNRasterLayerManager.m +4 -5
  70. package/ios/MLRN/MLRNRasterSource.m +21 -17
  71. package/ios/MLRN/MLRNRasterSourceManager.m +2 -3
  72. package/ios/MLRN/MLRNShapeSource.h +17 -16
  73. package/ios/MLRN/MLRNShapeSource.m +94 -102
  74. package/ios/MLRN/MLRNShapeSourceManager.h +2 -2
  75. package/ios/MLRN/MLRNShapeSourceManager.m +86 -90
  76. package/ios/MLRN/MLRNSnapshotModule.h +1 -1
  77. package/ios/MLRN/MLRNSnapshotModule.m +51 -53
  78. package/ios/MLRN/MLRNSource.h +12 -12
  79. package/ios/MLRN/MLRNSource.m +82 -88
  80. package/ios/MLRN/MLRNStyleValue.h +1 -1
  81. package/ios/MLRN/MLRNStyleValue.m +128 -128
  82. package/ios/MLRN/MLRNSymbolLayer.m +17 -13
  83. package/ios/MLRN/MLRNSymbolLayerManager.m +4 -5
  84. package/ios/MLRN/MLRNTileSource.h +1 -1
  85. package/ios/MLRN/MLRNTileSource.m +21 -20
  86. package/ios/MLRN/MLRNUserLocation.h +1 -1
  87. package/ios/MLRN/MLRNUserLocation.m +10 -12
  88. package/ios/MLRN/MLRNUtils.h +18 -11
  89. package/ios/MLRN/MLRNUtils.m +168 -160
  90. package/ios/MLRN/MLRNVectorLayer.m +28 -34
  91. package/ios/MLRN/MLRNVectorSource.h +3 -1
  92. package/ios/MLRN/MLRNVectorSource.m +14 -11
  93. package/ios/MLRN/MLRNVectorSourceManager.h +2 -2
  94. package/ios/MLRN/MLRNVectorSourceManager.m +36 -39
  95. package/ios/MLRN/ViewManager.h +1 -1
  96. package/ios/MLRN/ViewManager.m +29 -35
  97. package/lib/commonjs/components/MarkerView.js +1 -1
  98. package/lib/commonjs/components/ShapeSource.js +2 -1
  99. package/lib/commonjs/components/ShapeSource.js.map +1 -1
  100. package/lib/commonjs/components/UserLocation.js +8 -38
  101. package/lib/commonjs/components/UserLocation.js.map +1 -1
  102. package/lib/commonjs/components/UserLocationPuck.js +52 -0
  103. package/lib/commonjs/components/UserLocationPuck.js.map +1 -0
  104. package/lib/commonjs/components/{HeadingIndicator.js → UserLocationPuckHeading.js} +12 -9
  105. package/lib/commonjs/components/UserLocationPuckHeading.js.map +1 -0
  106. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js +8 -7
  107. package/lib/commonjs/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  108. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -2
  109. package/lib/commonjs/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  110. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js +28 -38
  111. package/lib/commonjs/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  112. package/lib/commonjs/utils/animated/AnimatedShape.js +11 -7
  113. package/lib/commonjs/utils/animated/AnimatedShape.js.map +1 -1
  114. package/lib/module/components/MarkerView.js +1 -1
  115. package/lib/module/components/ShapeSource.js +2 -1
  116. package/lib/module/components/ShapeSource.js.map +1 -1
  117. package/lib/module/components/UserLocation.js +7 -36
  118. package/lib/module/components/UserLocation.js.map +1 -1
  119. package/lib/module/components/UserLocationPuck.js +48 -0
  120. package/lib/module/components/UserLocationPuck.js.map +1 -0
  121. package/lib/module/components/{HeadingIndicator.js → UserLocationPuckHeading.js} +11 -7
  122. package/lib/module/components/UserLocationPuckHeading.js.map +1 -0
  123. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js +8 -7
  124. package/lib/module/utils/animated/AbstractAnimatedCoordinates.js.map +1 -1
  125. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js +1 -3
  126. package/lib/module/utils/animated/AnimatedExtractCoordinateFromArray.js.map +1 -1
  127. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js +29 -39
  128. package/lib/module/utils/animated/AnimatedRouteCoordinatesArray.js.map +1 -1
  129. package/lib/module/utils/animated/AnimatedShape.js +11 -7
  130. package/lib/module/utils/animated/AnimatedShape.js.map +1 -1
  131. package/lib/typescript/commonjs/src/components/MarkerView.d.ts +1 -1
  132. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts +1 -1
  133. package/lib/typescript/commonjs/src/components/ShapeSource.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/src/components/UserLocation.d.ts +0 -1
  135. package/lib/typescript/commonjs/src/components/UserLocation.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/src/components/UserLocationPuck.d.ts +9 -0
  137. package/lib/typescript/commonjs/src/components/UserLocationPuck.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/src/components/UserLocationPuckHeading.d.ts +9 -0
  139. package/lib/typescript/commonjs/src/components/UserLocationPuckHeading.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts +12 -13
  141. package/lib/typescript/commonjs/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +5 -4
  143. package/lib/typescript/commonjs/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts +0 -1
  145. package/lib/typescript/commonjs/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +33 -21
  147. package/lib/typescript/commonjs/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  148. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts +8 -5
  149. package/lib/typescript/commonjs/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  150. package/lib/typescript/module/src/components/MarkerView.d.ts +1 -1
  151. package/lib/typescript/module/src/components/ShapeSource.d.ts +1 -1
  152. package/lib/typescript/module/src/components/ShapeSource.d.ts.map +1 -1
  153. package/lib/typescript/module/src/components/UserLocation.d.ts +0 -1
  154. package/lib/typescript/module/src/components/UserLocation.d.ts.map +1 -1
  155. package/lib/typescript/module/src/components/UserLocationPuck.d.ts +9 -0
  156. package/lib/typescript/module/src/components/UserLocationPuck.d.ts.map +1 -0
  157. package/lib/typescript/module/src/components/UserLocationPuckHeading.d.ts +9 -0
  158. package/lib/typescript/module/src/components/UserLocationPuckHeading.d.ts.map +1 -0
  159. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts +12 -13
  160. package/lib/typescript/module/src/utils/animated/AbstractAnimatedCoordinates.d.ts.map +1 -1
  161. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts +5 -4
  162. package/lib/typescript/module/src/utils/animated/AnimatedExtractCoordinateFromArray.d.ts.map +1 -1
  163. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts +0 -1
  164. package/lib/typescript/module/src/utils/animated/AnimatedPoint.d.ts.map +1 -1
  165. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts +33 -21
  166. package/lib/typescript/module/src/utils/animated/AnimatedRouteCoordinatesArray.d.ts.map +1 -1
  167. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts +8 -5
  168. package/lib/typescript/module/src/utils/animated/AnimatedShape.d.ts.map +1 -1
  169. package/package.json +8 -8
  170. package/src/components/MarkerView.tsx +1 -1
  171. package/src/components/ShapeSource.tsx +58 -53
  172. package/src/components/UserLocation.tsx +13 -51
  173. package/src/components/UserLocationPuck.tsx +62 -0
  174. package/src/components/UserLocationPuckHeading.tsx +33 -0
  175. package/src/utils/animated/AbstractAnimatedCoordinates.ts +26 -15
  176. package/src/utils/animated/AnimatedExtractCoordinateFromArray.ts +10 -6
  177. package/src/utils/animated/AnimatedRouteCoordinatesArray.ts +63 -51
  178. package/src/utils/animated/AnimatedShape.ts +22 -13
  179. package/lib/commonjs/components/HeadingIndicator.js.map +0 -1
  180. package/lib/module/components/HeadingIndicator.js.map +0 -1
  181. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts +0 -7
  182. package/lib/typescript/commonjs/src/components/HeadingIndicator.d.ts.map +0 -1
  183. package/lib/typescript/module/src/components/HeadingIndicator.d.ts +0 -7
  184. package/lib/typescript/module/src/components/HeadingIndicator.d.ts.map +0 -1
  185. package/src/components/HeadingIndicator.tsx +0 -26
@@ -9,8 +9,8 @@
9
9
  @property (nonatomic, assign) CLLocationCoordinate2D coordinate;
10
10
  @property (nonatomic, assign) CGPoint screenPoint;
11
11
 
12
- + (MLRNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point;
13
- + (MLRNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point;
12
+ + (MLRNMapTouchEvent *)makeTapEvent:(MLNMapView *)mapView withPoint:(CGPoint)point;
13
+ + (MLRNMapTouchEvent *)makeLongPressEvent:(MLNMapView *)mapView withPoint:(CGPoint)point;
14
14
  + (MLRNMapTouchEvent *)makeAnnotationTapEvent:(MLRNPointAnnotation *)pointAnnotation;
15
15
  + (MLRNMapTouchEvent *)makeAnnotationTapEventOnDrag:(MLRNPointAnnotation *)pointAnnotation;
16
16
 
@@ -5,65 +5,66 @@
5
5
 
6
6
  @implementation MLRNMapTouchEvent
7
7
 
8
- - (NSDictionary*)payload
9
- {
10
- MLNPointFeature *feature = [[MLNPointFeature alloc] init];
11
- feature.coordinate = _coordinate;
12
- if (_id == nil) {
13
- feature.attributes = @{
14
- @"screenPointX": [NSNumber numberWithDouble:_screenPoint.x],
15
- @"screenPointY":[NSNumber numberWithDouble:_screenPoint.y]
16
- };
17
- } else {
18
- feature.attributes = @{
19
- @"id": _id,
20
- @"screenPointX": [NSNumber numberWithDouble:_screenPoint.x],
21
- @"screenPointY":[NSNumber numberWithDouble:_screenPoint.y]
22
- };
23
- }
24
- return [feature geoJSONDictionary];
8
+ - (NSDictionary *)payload {
9
+ MLNPointFeature *feature = [[MLNPointFeature alloc] init];
10
+ feature.coordinate = _coordinate;
11
+ if (_id == nil) {
12
+ feature.attributes = @{
13
+ @"screenPointX" : [NSNumber numberWithDouble:_screenPoint.x],
14
+ @"screenPointY" : [NSNumber numberWithDouble:_screenPoint.y]
15
+ };
16
+ } else {
17
+ feature.attributes = @{
18
+ @"id" : _id,
19
+ @"screenPointX" : [NSNumber numberWithDouble:_screenPoint.x],
20
+ @"screenPointY" : [NSNumber numberWithDouble:_screenPoint.y]
21
+ };
22
+ }
23
+ return [feature geoJSONDictionary];
25
24
  }
26
25
 
27
- + (MLRNMapTouchEvent*)makeTapEvent:(MLNMapView*)mapView withPoint:(CGPoint)point
28
- {
29
- return [MLRNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_TAP];
26
+ + (MLRNMapTouchEvent *)makeTapEvent:(MLNMapView *)mapView withPoint:(CGPoint)point {
27
+ return [MLRNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_TAP];
30
28
  }
31
29
 
32
- + (MLRNMapTouchEvent*)makeLongPressEvent:(MLNMapView*)mapView withPoint:(CGPoint)point
33
- {
34
- return [MLRNMapTouchEvent _fromPoint:point withMapView:mapView andEventType:RCT_MAPBOX_EVENT_LONGPRESS];
30
+ + (MLRNMapTouchEvent *)makeLongPressEvent:(MLNMapView *)mapView withPoint:(CGPoint)point {
31
+ return [MLRNMapTouchEvent _fromPoint:point
32
+ withMapView:mapView
33
+ andEventType:RCT_MAPBOX_EVENT_LONGPRESS];
35
34
  }
36
35
 
37
- + (MLRNMapTouchEvent *)makeAnnotationTapEvent:(MLRNPointAnnotation *)pointAnnotation
38
- {
39
- MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
40
- event.type = RCT_MAPBOX_ANNOTATION_TAP;
41
- event.id = pointAnnotation.id;
42
- event.coordinate = pointAnnotation.coordinate;
43
- event.screenPoint = [pointAnnotation.superview convertPoint:pointAnnotation.frame.origin toView:nil];
44
- return event;
36
+ + (MLRNMapTouchEvent *)makeAnnotationTapEvent:(MLRNPointAnnotation *)pointAnnotation {
37
+ MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
38
+ event.type = RCT_MAPBOX_ANNOTATION_TAP;
39
+ event.id = pointAnnotation.id;
40
+ event.coordinate = pointAnnotation.coordinate;
41
+ event.screenPoint = [pointAnnotation.superview convertPoint:pointAnnotation.frame.origin
42
+ toView:nil];
43
+ return event;
45
44
  }
46
45
 
47
- + (MLRNMapTouchEvent *)makeAnnotationTapEventOnDrag:(MLRNPointAnnotation *)pointAnnotation
48
- {
49
- MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
50
- event.type = RCT_MAPBOX_ANNOTATION_TAP;
51
- event.id = pointAnnotation.id;
52
- CGPoint screenPoint = [pointAnnotation.superview convertPoint:pointAnnotation.layer.position toView:nil];
53
- screenPoint.x -= (pointAnnotation.layer.bounds.size.width * pointAnnotation.layer.anchorPoint.x);
54
- screenPoint.y -= (pointAnnotation.layer.bounds.size.height * pointAnnotation.layer.anchorPoint.y);
55
- event.screenPoint = screenPoint;
56
- event.coordinate = [pointAnnotation.map convertPoint:pointAnnotation.layer.position toCoordinateFromView:pointAnnotation.map];
57
- return event;
46
+ + (MLRNMapTouchEvent *)makeAnnotationTapEventOnDrag:(MLRNPointAnnotation *)pointAnnotation {
47
+ MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
48
+ event.type = RCT_MAPBOX_ANNOTATION_TAP;
49
+ event.id = pointAnnotation.id;
50
+ CGPoint screenPoint = [pointAnnotation.superview convertPoint:pointAnnotation.layer.position
51
+ toView:nil];
52
+ screenPoint.x -= (pointAnnotation.layer.bounds.size.width * pointAnnotation.layer.anchorPoint.x);
53
+ screenPoint.y -= (pointAnnotation.layer.bounds.size.height * pointAnnotation.layer.anchorPoint.y);
54
+ event.screenPoint = screenPoint;
55
+ event.coordinate = [pointAnnotation.map convertPoint:pointAnnotation.layer.position
56
+ toCoordinateFromView:pointAnnotation.map];
57
+ return event;
58
58
  }
59
59
 
60
- + (MLRNMapTouchEvent*)_fromPoint:(CGPoint)point withMapView:(MLNMapView *)mapView andEventType:(NSString*)eventType
61
- {
62
- MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
63
- event.type = eventType;
64
- event.coordinate = [mapView convertPoint:point toCoordinateFromView:mapView];
65
- event.screenPoint = point;
66
- return event;
60
+ + (MLRNMapTouchEvent *)_fromPoint:(CGPoint)point
61
+ withMapView:(MLNMapView *)mapView
62
+ andEventType:(NSString *)eventType {
63
+ MLRNMapTouchEvent *event = [[MLRNMapTouchEvent alloc] init];
64
+ event.type = eventType;
65
+ event.coordinate = [mapView convertPoint:point toCoordinateFromView:mapView];
66
+ event.screenPoint = point;
67
+ return event;
67
68
  }
68
69
 
69
70
  @end
@@ -1,8 +1,8 @@
1
1
  #import <React/RCTComponent.h>
2
- #import "MLRNSource.h"
3
- #import "MLRNShapeSource.h"
4
- #import "MLRNPointAnnotation.h"
5
2
  #import "MLRNLight.h"
3
+ #import "MLRNPointAnnotation.h"
4
+ #import "MLRNShapeSource.h"
5
+ #import "MLRNSource.h"
6
6
 
7
7
  @import MapLibre;
8
8
 
@@ -10,44 +10,46 @@
10
10
  @class MLRNImages;
11
11
  @class MLRNLogging;
12
12
 
13
- @protocol MLRNMapViewCamera<NSObject>
13
+ @protocol MLRNMapViewCamera <NSObject>
14
14
  - (void)initialLayout;
15
15
  - (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated;
16
16
  @end
17
17
 
18
- typedef void (^FoundLayerBlock) (MLNStyleLayer* __nonnull layer);
19
- typedef void (^StyleLoadedBlock) (MLNStyle* __nonnull style);
18
+ typedef void (^FoundLayerBlock)(MLNStyleLayer *__nonnull layer);
19
+ typedef void (^StyleLoadedBlock)(MLNStyle *__nonnull style);
20
20
 
21
- @interface MLRNMapView : MLNMapView<RCTInvalidating>
21
+ @interface MLRNMapView : MLNMapView <RCTInvalidating>
22
22
 
23
- @property (nonatomic, strong, nonnull) MLRNLogging* logging;
24
- @property (nonatomic, strong) CameraUpdateQueue *cameraUpdateQueue;
23
+ @property (nonatomic, strong, nonnull) MLRNLogging *logging;
24
+ @property (nonatomic, strong, nonnull) CameraUpdateQueue *cameraUpdateQueue;
25
25
  @property (nonatomic, weak) id<MLRNMapViewCamera> reactCamera;
26
- @property (nonatomic, strong) NSMutableArray<id<RCTComponent>> *reactSubviews;
27
- @property (nonatomic, strong) NSMutableArray<MLRNSource*> *sources;
28
- @property (nonatomic, strong) NSMutableArray<MLRNImages*> *images;
29
- @property (nonatomic, strong) NSMutableArray<MLRNLayer*> *layers;
30
- @property (nonatomic, strong) NSMutableArray<MLRNPointAnnotation*> *pointAnnotations;
31
- @property (nonatomic, strong) MLRNLight *light;
32
- @property (nonatomic, copy) NSArray<NSNumber *> *reactContentInset;
33
-
34
- @property (nonatomic, strong) NSMutableDictionary<NSString*, NSMutableArray<FoundLayerBlock>*> *layerWaiters;
35
- @property (nonatomic, strong) NSMutableArray<StyleLoadedBlock> *styleWaiters;
26
+ @property (nonatomic, strong, nonnull) NSMutableArray<id<RCTComponent>> *reactSubviews;
27
+ @property (nonatomic, strong, nonnull) NSMutableArray<MLRNSource *> *sources;
28
+ @property (nonatomic, strong, nonnull) NSMutableArray<MLRNImages *> *images;
29
+ @property (nonatomic, strong, nonnull) NSMutableArray<MLRNLayer *> *layers;
30
+ @property (nonatomic, strong, nonnull) NSMutableArray<MLRNPointAnnotation *> *pointAnnotations;
31
+ @property (nonatomic, strong, nullable) MLRNLight *light;
32
+ @property (nonatomic, copy, nullable) NSArray<NSNumber *> *reactContentInset;
33
+
34
+ @property (nonatomic, strong, nonnull)
35
+ NSMutableDictionary<NSString *, NSMutableArray<FoundLayerBlock> *> *layerWaiters;
36
+ @property (nonatomic, strong, nonnull) NSMutableArray<StyleLoadedBlock> *styleWaiters;
36
37
 
37
38
  @property (nonatomic, assign) BOOL reactLocalizeLabels;
38
39
  @property (nonatomic, assign) BOOL reactScrollEnabled;
39
40
  @property (nonatomic, assign) BOOL reactPitchEnabled;
40
41
  @property (nonatomic, assign) BOOL reactRotateEnabled;
41
42
  @property (nonatomic, assign) BOOL reactAttributionEnabled;
42
- @property (nonatomic, strong) NSDictionary<NSString *, NSNumber *> *reactAttributionPosition;
43
+ @property (nonatomic, strong, nullable)
44
+ NSDictionary<NSString *, NSNumber *> *reactAttributionPosition;
43
45
  @property (nonatomic, assign) BOOL reactLogoEnabled;
44
46
  @property (nonatomic, assign) BOOL reactCompassEnabled;
45
47
  @property (nonatomic, assign) BOOL reactZoomEnabled;
46
48
 
47
- @property (nonatomic, assign) NSInteger *reactCompassViewPosition;
49
+ @property (nonatomic, assign) NSInteger reactCompassViewPosition;
48
50
  @property (nonatomic, assign) CGPoint reactCompassViewMargins;
49
51
 
50
- @property (nonatomic, copy) NSString *reactMapStyle;
52
+ @property (nonatomic, copy, nullable) NSString *reactMapStyle;
51
53
  @property (nonatomic, assign) NSInteger reactPreferredFramesPerSecond;
52
54
 
53
55
  @property (nonatomic, assign) MLNCoordinateBounds maxBounds;
@@ -55,28 +57,33 @@ typedef void (^StyleLoadedBlock) (MLNStyle* __nonnull style);
55
57
  @property (nonatomic, assign) BOOL isUserInteraction;
56
58
  @property (nonatomic, assign) BOOL useNativeUserLocationAnnotationView;
57
59
 
58
- @property (nonatomic, copy) RCTBubblingEventBlock onPress;
59
- @property (nonatomic, copy) RCTBubblingEventBlock onLongPress;
60
- @property (nonatomic, copy) RCTBubblingEventBlock onMapChange;
61
-
60
+ @property (nonatomic, copy, nullable) RCTBubblingEventBlock onPress;
61
+ @property (nonatomic, copy, nullable) RCTBubblingEventBlock onLongPress;
62
+ @property (nonatomic, copy, nullable) RCTBubblingEventBlock onMapChange;
62
63
 
63
- - (void)layerAdded:(MLNStyleLayer*) layer;
64
+ - (void)layerAdded:(nonnull MLNStyleLayer *)layer;
64
65
 
65
66
  - (CLLocationDistance)getMetersPerPixelAtLatitude:(double)latitude withZoom:(double)zoomLevel;
66
67
  - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel;
67
68
  - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationDegrees)latitude;
68
- - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel atLatitude:(CLLocationDegrees)latitude atPitch:(CGFloat)pitch;
69
- - (MLRNPointAnnotation*)getRCTPointAnnotation:(MLNPointAnnotation*)mlnAnnotation;
70
- - (NSArray<MLRNSource *> *)getAllTouchableSources;
71
- - (NSArray<MLRNSource *> *)getAllShapeSources;
72
- - (NSArray<MLRNImages *> *)getAllImages;
73
- - (MLRNSource *)getTouchableSourceWithHighestZIndex:(NSArray<MLRNSource *> *)touchableSources;
74
- - (NSString *)takeSnap:(BOOL)writeToDisk;
69
+ - (CLLocationDistance)altitudeFromZoom:(double)zoomLevel
70
+ atLatitude:(CLLocationDegrees)latitude
71
+ atPitch:(CGFloat)pitch;
72
+ - (nonnull MLRNPointAnnotation *)getRCTPointAnnotation:(nonnull MLNPointAnnotation *)mlnAnnotation;
73
+ - (nonnull NSArray<MLRNSource *> *)getAllTouchableSources;
74
+ - (nonnull NSArray<MLRNSource *> *)getAllShapeSources;
75
+ - (nonnull NSArray<MLRNImages *> *)getAllImages;
76
+ - (nonnull MLRNSource *)getTouchableSourceWithHighestZIndex:
77
+ (nonnull NSArray<MLRNSource *> *)touchableSources;
78
+ - (nonnull NSString *)takeSnap:(BOOL)writeToDisk;
75
79
  - (void)didChangeUserTrackingMode:(MLNUserTrackingMode)mode animated:(BOOL)animated;
76
80
 
77
- - (void)waitForLayerWithID:(nonnull NSString*)layerID then:(void (^ _Nonnull)(MLNStyleLayer* _Nonnull layer))foundLayer;
81
+ - (void)waitForLayerWithID:(nonnull NSString *)layerID
82
+ then:(void (^_Nonnull)(MLNStyleLayer *_Nonnull layer))foundLayer;
78
83
 
79
- - (void)setSourceVisibility:(BOOL)visiblity sourceId:(nonnull NSString*)sourceId sourceLayerId:(nullable NSString*)sourceLayerId;
84
+ - (void)setSourceVisibility:(BOOL)visiblity
85
+ sourceId:(nonnull NSString *)sourceId
86
+ sourceLayerId:(nullable NSString *)sourceLayerId;
80
87
 
81
88
  - (void)notifyStyleLoaded;
82
89