@maplibre/maplibre-react-native 11.0.0-alpha.16 → 11.0.0-alpha.18
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.
- package/android/src/main/java/org/maplibre/reactnative/MLRNPackage.kt +6 -6
- package/android/src/main/java/org/maplibre/reactnative/components/camera/MLRNCameraManager.kt +3 -5
- package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.kt +154 -0
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.kt +70 -0
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.kt +50 -0
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLocationModule.kt +20 -4
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogModule.kt +99 -0
- package/ios/components/camera/MLRNCameraComponentView.h +0 -8
- package/ios/components/map-view/MLRNMapView.m +1 -1
- package/ios/components/map-view/MLRNMapViewComponentView.h +0 -5
- package/ios/components/user-location/MLRNNativeUserLocation.h +1 -1
- package/ios/components/user-location/MLRNNativeUserLocation.m +6 -5
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.h +10 -0
- package/ios/components/user-location/MLRNNativeUserLocationComponentView.mm +51 -0
- package/ios/modules/location/MLRNLocation.m +17 -14
- package/ios/modules/logging/MLRNLogModule.h +10 -0
- package/ios/modules/logging/MLRNLogModule.mm +39 -0
- package/ios/modules/logging/MLRNLogging.h +15 -7
- package/ios/modules/logging/MLRNLogging.m +22 -55
- package/lib/commonjs/components/annotations/Annotation.js +2 -1
- package/lib/commonjs/components/annotations/Annotation.js.map +1 -1
- package/lib/commonjs/components/map-view/MapView.js +3 -3
- package/lib/commonjs/components/map-view/MapView.js.map +1 -1
- package/lib/commonjs/components/sources/ShapeSource.js +1 -0
- package/lib/commonjs/components/sources/ShapeSource.js.map +1 -1
- package/lib/commonjs/components/user-location/NativeUserLocation.js +3 -4
- package/lib/commonjs/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocation.js +22 -132
- package/lib/commonjs/components/user-location/UserLocation.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/commonjs/components/user-location/UserLocationPuck.js +34 -22
- package/lib/commonjs/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js +3 -2
- package/lib/commonjs/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/commonjs/hooks/useCurrentPosition.js +34 -0
- package/lib/commonjs/hooks/useCurrentPosition.js.map +1 -0
- package/lib/commonjs/index.js +16 -15
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/log/LogManager.js +99 -0
- package/lib/commonjs/modules/log/LogManager.js.map +1 -0
- package/lib/commonjs/modules/log/NativeLogModule.js +9 -0
- package/lib/commonjs/modules/log/NativeLogModule.js.map +1 -0
- package/lib/commonjs/utils/animated/Animated.js +1 -7
- package/lib/commonjs/utils/animated/Animated.js.map +1 -1
- package/lib/module/components/annotations/Annotation.js +3 -2
- package/lib/module/components/annotations/Annotation.js.map +1 -1
- package/lib/module/components/map-view/MapView.js +3 -3
- package/lib/module/components/map-view/MapView.js.map +1 -1
- package/lib/module/components/sources/ShapeSource.js +1 -0
- package/lib/module/components/sources/ShapeSource.js.map +1 -1
- package/lib/module/components/user-location/NativeUserLocation.js +2 -4
- package/lib/module/components/user-location/NativeUserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocation.js +22 -132
- package/lib/module/components/user-location/UserLocation.js.map +1 -1
- package/lib/module/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/lib/module/components/user-location/UserLocationPuck.js +34 -22
- package/lib/module/components/user-location/UserLocationPuck.js.map +1 -1
- package/lib/module/components/user-location/UserLocationPuckHeading.js +3 -2
- package/lib/module/components/user-location/UserLocationPuckHeading.js.map +1 -1
- package/lib/module/hooks/useCurrentPosition.js +30 -0
- package/lib/module/hooks/useCurrentPosition.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/log/LogManager.js +96 -0
- package/lib/module/modules/log/LogManager.js.map +1 -0
- package/lib/module/modules/log/NativeLogModule.js +5 -0
- package/lib/module/modules/log/NativeLogModule.js.map +1 -0
- package/lib/module/utils/animated/Animated.js +0 -6
- package/lib/module/utils/animated/Animated.js.map +1 -1
- package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/annotations/Annotation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/sources/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts +12 -13
- package/lib/typescript/commonjs/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts +13 -53
- package/lib/typescript/commonjs/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/commonjs/src/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/location/LocationManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/location/NativeLocationModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts +45 -0
- package/lib/typescript/commonjs/src/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts +1 -13
- package/lib/typescript/commonjs/src/utils/animated/Animated.d.ts.map +1 -1
- package/lib/typescript/module/src/components/annotations/Annotation.d.ts +3 -2
- package/lib/typescript/module/src/components/annotations/Annotation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/sources/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts +12 -13
- package/lib/typescript/module/src/components/user-location/NativeUserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts +13 -53
- package/lib/typescript/module/src/components/user-location/UserLocation.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts +8 -0
- package/lib/typescript/module/src/components/user-location/UserLocationNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts +2 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuck.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-location/UserLocationPuckHeading.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts +18 -0
- package/lib/typescript/module/src/hooks/useCurrentPosition.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts +3 -3
- package/lib/typescript/module/src/modules/location/LocationManager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts +3 -3
- package/lib/typescript/module/src/modules/location/NativeLocationModule.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/log/LogManager.d.ts +45 -0
- package/lib/typescript/module/src/modules/log/LogManager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts +13 -0
- package/lib/typescript/module/src/modules/log/NativeLogModule.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/animated/Animated.d.ts +1 -13
- package/lib/typescript/module/src/utils/animated/Animated.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/components/annotations/Annotation.tsx +7 -5
- package/src/components/map-view/MapView.tsx +3 -3
- package/src/components/sources/ShapeSource.tsx +1 -0
- package/src/components/user-location/NativeUserLocation.tsx +15 -19
- package/src/components/user-location/UserLocation.tsx +65 -249
- package/src/components/user-location/UserLocationNativeComponent.ts +19 -0
- package/src/components/user-location/UserLocationPuck.tsx +47 -28
- package/src/components/user-location/UserLocationPuckHeading.tsx +2 -1
- package/src/hooks/useCurrentPosition.ts +53 -0
- package/src/index.ts +6 -7
- package/src/modules/location/LocationManager.ts +3 -3
- package/src/modules/location/NativeLocationModule.ts +3 -3
- package/src/modules/log/LogManager.ts +114 -0
- package/src/modules/log/NativeLogModule.ts +16 -0
- package/src/utils/animated/Animated.ts +1 -28
- package/android/src/main/java/org/maplibre/reactnative/components/location/LocationComponentManager.java +0 -165
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocation.java +0 -76
- package/android/src/main/java/org/maplibre/reactnative/components/location/MLRNNativeUserLocationManager.java +0 -40
- package/android/src/main/java/org/maplibre/reactnative/modules/MLRNLogging.java +0 -140
- package/ios/components/user-location/MLRNNativeUserLocationManager.h +0 -5
- package/ios/components/user-location/MLRNNativeUserLocationManager.m +0 -21
- package/lib/commonjs/modules/Logger.js +0 -112
- package/lib/commonjs/modules/Logger.js.map +0 -1
- package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js +0 -14
- package/lib/commonjs/modules/location/requestAndroidLocationPermissions.js.map +0 -1
- package/lib/module/modules/Logger.js +0 -107
- package/lib/module/modules/Logger.js.map +0 -1
- package/lib/module/modules/location/requestAndroidLocationPermissions.js +0 -11
- package/lib/module/modules/location/requestAndroidLocationPermissions.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/Logger.d.ts +0 -49
- package/lib/typescript/commonjs/src/modules/Logger.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
- package/lib/typescript/commonjs/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/Logger.d.ts +0 -49
- package/lib/typescript/module/src/modules/Logger.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts +0 -5
- package/lib/typescript/module/src/modules/location/requestAndroidLocationPermissions.d.ts.map +0 -1
- package/src/modules/Logger.ts +0 -127
- package/src/modules/location/requestAndroidLocationPermissions.ts +0 -8
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#import "MLRNLogModule.h"
|
|
2
|
+
|
|
3
|
+
#import "MLRNLogging.h"
|
|
4
|
+
|
|
5
|
+
@implementation MLRNLogModule {
|
|
6
|
+
MLRNLogging *logging;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
+ (NSString *)moduleName {
|
|
10
|
+
return @"MLRNLogModule";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
14
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
15
|
+
return std::make_shared<facebook::react::NativeLogModuleSpecJSI>(params);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
- (instancetype)init {
|
|
19
|
+
if (self = [super init]) {
|
|
20
|
+
logging = [[MLRNLogging alloc] init];
|
|
21
|
+
logging.delegate = self;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return self;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
- (void)setLogLevel:(NSString *)logLevel {
|
|
28
|
+
[logging setLogLevel:logLevel];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (void)logging:(nonnull id)logging
|
|
32
|
+
didReceiveLogWithLevel:(nonnull NSString *)level
|
|
33
|
+
filePath:(nonnull NSString *)filePath
|
|
34
|
+
line:(NSUInteger)line
|
|
35
|
+
message:(nonnull NSString *)message {
|
|
36
|
+
[self emitOnLog:@{ @"level" : level, @"tag" : filePath, @"message" : message}];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@end
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
#ifndef MLRNLogging_h
|
|
2
|
-
#define MLRNLogging_h
|
|
3
|
-
|
|
4
1
|
#import <Foundation/Foundation.h>
|
|
5
|
-
#import <React/RCTEventEmitter.h>
|
|
6
2
|
|
|
7
3
|
@class MLNLoggingConfiguration;
|
|
8
4
|
|
|
9
|
-
@
|
|
5
|
+
@protocol MLRNLoggingDelegate <NSObject>
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
- (void)logging:(nonnull id)logging
|
|
8
|
+
didReceiveLogWithLevel:(nonnull NSString*)level
|
|
9
|
+
|
|
10
|
+
filePath:(nonnull NSString*)filePath
|
|
11
|
+
line:(NSUInteger)line
|
|
12
|
+
message:(nonnull NSString*)message;
|
|
12
13
|
|
|
13
14
|
@end
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
@interface MLRNLogging : NSObject
|
|
17
|
+
|
|
18
|
+
@property (nonatomic, nonnull) MLNLoggingConfiguration* loggingConfiguration;
|
|
19
|
+
@property (nonatomic, weak, nullable) id<MLRNLoggingDelegate> delegate;
|
|
20
|
+
|
|
21
|
+
- (void)setLogLevel:(nonnull NSString*)logLevel;
|
|
22
|
+
|
|
23
|
+
@end
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
@import MapLibre;
|
|
4
4
|
|
|
5
|
-
@interface MLRNLogging ()
|
|
6
|
-
@property (nonatomic) BOOL hasListeners;
|
|
7
|
-
@end
|
|
8
|
-
|
|
9
5
|
@implementation MLRNLogging
|
|
10
6
|
|
|
11
7
|
+ (id)allocWithZone:(NSZone *)zone {
|
|
@@ -30,85 +26,55 @@
|
|
|
30
26
|
return self;
|
|
31
27
|
}
|
|
32
28
|
|
|
33
|
-
RCT_EXPORT_MODULE();
|
|
34
|
-
|
|
35
|
-
+ (BOOL)requiresMainQueueSetup {
|
|
36
|
-
return YES;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
- (NSArray<NSString *> *)supportedEvents {
|
|
40
|
-
return @[ @"LogEvent" ];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
- (void)startObserving {
|
|
44
|
-
[super startObserving];
|
|
45
|
-
self.hasListeners = true;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
- (void)stopObserving {
|
|
49
|
-
[super stopObserving];
|
|
50
|
-
self.hasListeners = false;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
29
|
- (void)sendLogWithLevel:(MLNLoggingLevel)loggingLevel
|
|
54
30
|
filePath:(NSString *)filePath
|
|
55
31
|
line:(NSUInteger)line
|
|
56
32
|
message:(NSString *)message {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
NSString *level = @"n/a";
|
|
33
|
+
NSString *level = @"unknown";
|
|
60
34
|
switch (loggingLevel) {
|
|
61
|
-
case
|
|
62
|
-
level = @"
|
|
35
|
+
case MLNLoggingLevelNone:
|
|
36
|
+
level = @"none";
|
|
37
|
+
break;
|
|
38
|
+
case MLNLoggingLevelFault:
|
|
39
|
+
level = @"fault";
|
|
63
40
|
break;
|
|
64
41
|
case MLNLoggingLevelError:
|
|
65
42
|
level = @"error";
|
|
66
43
|
break;
|
|
44
|
+
case MLNLoggingLevelWarning:
|
|
45
|
+
level = @"warn";
|
|
46
|
+
break;
|
|
47
|
+
case MLNLoggingLevelInfo:
|
|
48
|
+
level = @"info";
|
|
49
|
+
break;
|
|
67
50
|
#if MLN_LOGGING_ENABLE_DEBUG
|
|
68
51
|
case MLNLoggingLevelDebug:
|
|
69
52
|
level = @"debug";
|
|
70
53
|
break;
|
|
71
54
|
#endif
|
|
72
|
-
case MLNLoggingLevelWarning:
|
|
73
|
-
level = @"warning";
|
|
74
|
-
break;
|
|
75
|
-
case MLNLoggingLevelNone:
|
|
76
|
-
level = @"none";
|
|
77
|
-
break;
|
|
78
|
-
case MLNLoggingLevelFault:
|
|
79
|
-
level = @"fault";
|
|
80
|
-
break;
|
|
81
55
|
case MLNLoggingLevelVerbose:
|
|
82
56
|
level = @"verbose";
|
|
83
57
|
break;
|
|
84
58
|
}
|
|
85
59
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
if (self.delegate) {
|
|
61
|
+
[self.delegate logging:self
|
|
62
|
+
didReceiveLogWithLevel:level
|
|
63
|
+
filePath:filePath
|
|
64
|
+
line:line
|
|
65
|
+
message:message];
|
|
89
66
|
}
|
|
90
|
-
|
|
91
|
-
NSMutableDictionary *body =
|
|
92
|
-
[@{@"level" : level, @"message" : message, @"filePath" : filePath, @"line" : @(line)}
|
|
93
|
-
mutableCopy];
|
|
94
|
-
|
|
95
|
-
if (type != nil) {
|
|
96
|
-
body[@"type"] = type;
|
|
97
|
-
}
|
|
98
|
-
[self sendEventWithName:@"LogEvent" body:body];
|
|
99
67
|
}
|
|
100
68
|
|
|
101
|
-
|
|
69
|
+
- (void)setLogLevel:(nonnull NSString *)logLevel {
|
|
102
70
|
MLNLoggingLevel mlnLogLevel = MLNLoggingLevelNone;
|
|
103
71
|
if ([logLevel isEqualToString:@"none"]) {
|
|
104
72
|
mlnLogLevel = MLNLoggingLevelNone;
|
|
105
|
-
} else if ([logLevel isEqualToString:@"debug"]) {
|
|
106
|
-
mlnLogLevel = MLNLoggingLevelInfo;
|
|
107
73
|
} else if ([logLevel isEqualToString:@"fault"]) {
|
|
108
74
|
mlnLogLevel = MLNLoggingLevelFault;
|
|
109
75
|
} else if ([logLevel isEqualToString:@"error"]) {
|
|
110
76
|
mlnLogLevel = MLNLoggingLevelError;
|
|
111
|
-
} else if ([logLevel isEqualToString:@"
|
|
77
|
+
} else if ([logLevel isEqualToString:@"warn"]) {
|
|
112
78
|
mlnLogLevel = MLNLoggingLevelWarning;
|
|
113
79
|
} else if ([logLevel isEqualToString:@"info"]) {
|
|
114
80
|
mlnLogLevel = MLNLoggingLevelInfo;
|
|
@@ -121,7 +87,8 @@ RCT_EXPORT_METHOD(setLogLevel : (nonnull NSString *)logLevel) {
|
|
|
121
87
|
} else if ([logLevel isEqualToString:@"verbose"]) {
|
|
122
88
|
mlnLogLevel = MLNLoggingLevelVerbose;
|
|
123
89
|
}
|
|
124
|
-
|
|
90
|
+
|
|
91
|
+
[self.loggingConfiguration setLoggingLevel:mlnLogLevel];
|
|
125
92
|
}
|
|
126
93
|
|
|
127
94
|
@end
|
|
@@ -84,8 +84,9 @@ const Annotation = exports.Annotation = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
84
84
|
children.push(props.children);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.Animated.ShapeSource, {
|
|
88
88
|
id: props.id,
|
|
89
|
+
testID: props.testID,
|
|
89
90
|
onPress: props.onPress,
|
|
90
91
|
shape: shape,
|
|
91
92
|
children: children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_Animated","_AnimatedPoint","_SymbolLayer","_jsxRuntime","getShapeFromProps","props","lng","coordinates","lat","point","type","animated","AnimatedPoint","isShapeAnimated","shape","Annotation","exports","forwardRef","animationDuration","animationEasingFunction","Easing","linear","otherProps","ref","useImperativeHandle","symbolStyle","setShape","useState","coordinateDeps","join","useEffect","Array","isArray","stopAnimation","timing","easing","duration","start","newShape","children","icon","style","iconImage","undefined","push","jsx","SymbolLayer","id","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_Animated","_AnimatedPoint","_SymbolLayer","_jsxRuntime","getShapeFromProps","props","lng","coordinates","lat","point","type","animated","AnimatedPoint","isShapeAnimated","shape","Annotation","exports","forwardRef","animationDuration","animationEasingFunction","Easing","linear","otherProps","ref","useImperativeHandle","symbolStyle","setShape","useState","coordinateDeps","join","useEffect","Array","isArray","stopAnimation","timing","easing","duration","start","newShape","children","icon","style","iconImage","undefined","push","jsx","SymbolLayer","id","Animated","ShapeSource","testID","onPress","displayName"],"sourceRoot":"../../../../src","sources":["components/annotations/Annotation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAAoD,IAAAK,WAAA,GAAAL,OAAA;AAgBpD,SAASM,iBAAiBA,CAACC,KAA+B,GAAG,CAAC,CAAC,EAAS;EACtE,MAAMC,GAAG,GAAGD,KAAK,CAACE,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;EACvC,MAAMC,GAAG,GAAGH,KAAK,CAACE,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;EACvC,MAAME,KAAoB,GAAG;IAAEC,IAAI,EAAE,OAAO;IAAEH,WAAW,EAAE,CAACD,GAAG,EAAEE,GAAG;EAAE,CAAC;EAEvE,IAAIH,KAAK,CAACM,QAAQ,EAAE;IAClB,OAAO,IAAIC,4BAAa,CAACH,KAAK,CAAC;EACjC;EAEA,OAAOA,KAAK;AACd;AAEA,SAASI,eAAeA,CAACC,KAAY,EAA0B;EAC7D,OAAOA,KAAK,YAAYF,4BAAa;AACvC;AAMO,MAAMG,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CACE;EACEN,QAAQ,GAAG,KAAK;EAChBO,iBAAiB,GAAG,IAAI;EACxBC,uBAAuB,GAAGC,mBAAM,CAACC,MAAM;EACvC,GAAGC;AACY,CAAC,EAClBC,GAAG,KACA;EACH,MAAMlB,KAAK,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CAACmC,IAAI,GAAGG;EAC3D,CAAC,GACDA,SAAS;EAEb,IAAIlB,WAAW,EAAE;IACfc,QAAQ,CAACK,IAAI,cACX,IAAAzC,WAAA,CAAA0C,GAAA,EAAC3C,YAAA,CAAA4C,WAAW;MAACC,EAAE,EAAE,GAAG1C,KAAK,CAAC0C,EAAE,SAAU;MAACN,KAAK,EAAEhB;IAAY,CAAE,CAC9D,CAAC;EACH;EAEA,IAAIpB,KAAK,CAACkC,QAAQ,EAAE;IAClB,IAAIR,KAAK,CAACC,OAAO,CAAC3B,KAAK,CAACkC,QAAQ,CAAC,EAAE;MACjCA,QAAQ,CAACK,IAAI,CAAC,GAAGvC,KAAK,CAACkC,QAAQ,CAAC;IAClC,CAAC,MAAM;MACLA,QAAQ,CAACK,IAAI,CAACvC,KAAK,CAACkC,QAAQ,CAAC;IAC/B;EACF;EAEA,oBACE,IAAApC,WAAA,CAAA0C,GAAA,EAAC7C,SAAA,CAAAgD,QAAQ,CAACC,WAAW;IACnBF,EAAE,EAAE1C,KAAK,CAAC0C,EAAG;IACbG,MAAM,EAAE7C,KAAK,CAAC6C,MAAO;IACrBC,OAAO,EAAE9C,KAAK,CAAC8C,OAAQ;IACvBrC,KAAK,EAAEA,KAAsD;IAAAyB,QAAA,EAE5DA;EAAQ,CACW,CAAC;AAE3B,CACF,CAAC;AAEDxB,UAAU,CAACqC,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _MapViewNativeComponent = _interopRequireDefault(require("./MapViewNativeComponent"));
|
|
10
10
|
var _NativeMapViewModule = _interopRequireDefault(require("./NativeMapViewModule.js"));
|
|
11
|
-
var
|
|
11
|
+
var _LogManager = require("../../modules/log/LogManager.js");
|
|
12
12
|
var _index = require("../../utils/index.js");
|
|
13
13
|
var _StyleValue = require("../../utils/StyleValue.js");
|
|
14
14
|
var _filterUtils = require("../../utils/filterUtils.js");
|
|
@@ -69,9 +69,9 @@ const MapView = exports.MapView = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0,
|
|
|
69
69
|
|
|
70
70
|
// Start before rendering
|
|
71
71
|
(0, _react.useLayoutEffect)(() => {
|
|
72
|
-
|
|
72
|
+
_LogManager.LogManager.start();
|
|
73
73
|
return () => {
|
|
74
|
-
|
|
74
|
+
_LogManager.LogManager.stop();
|
|
75
75
|
};
|
|
76
76
|
}, []);
|
|
77
77
|
const nativeProps = (0, _react.useMemo)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_MapViewNativeComponent","_interopRequireDefault","_NativeMapViewModule","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_MapViewNativeComponent","_interopRequireDefault","_NativeMapViewModule","_LogManager","_index","_StyleValue","_filterUtils","_jsxRuntime","e","__esModule","default","MLRNModule","NativeModules","console","error","NativeAndroidTextureMapViewComponent","isAndroid","requireNativeComponent","undefined","styles","StyleSheet","create","flex1","flex","findNodeHandle","ref","nodeHandle","rnFindNodeHandle","Error","MapView","exports","memo","forwardRef","androidView","style","testID","props","isReady","setIsReady","useState","nativeRef","useRef","useImperativeHandle","getCenter","NativeMapViewModule","current","getZoom","getBearing","getPitch","getBounds","getViewState","project","coordinate","unproject","point","queryRenderedFeatures","geometryOrOptions","options","queryRenderedFeaturesWithCoordinate","layers","getFilter","filter","Array","isArray","queryRenderedFeaturesWithBounds","takeSnap","writeToDisk","setSourceVisibility","visible","source","sourceLayer","showAttribution","useLayoutEffect","LogManager","start","stop","nativeProps","useMemo","mapStyle","light","otherProps","nativeMapStyle","JSON","stringify","transformedLight","transformStyle","mapView","jsx","View","onLayout","children"],"sourceRoot":"../../../../src","sources":["components/map-view/MapView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAaA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,uBAAA,GAAAC,sBAAA,CAAAH,OAAA;A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AAEA,KAAK,IAAIf,MAAM,CAACG,KAAM;IAC7Ba,MAAM,EAAEmD,OAAO,GAAGpE,SAAS,GAAGiB,MAAO;IAAAuD,QAAA,EAEpCJ;EAAO,CACJ,CAAC;AAEX,CACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_useNativeBridge","_index","_filterUtils","_jsxRuntime","MLRNModule","NativeModules","NATIVE_MODULE_NAME","exports","ShapeSource","memo","forwardRef","id","shapeId","StyleSource","DefaultSourceID","props","ref","useImperativeHandle","_nativeRef","current","features","getClusterExpansionZoom","getClusterLeaves","getClusterChildren","setNativeProps","useRef","_runNativeCommand","_runPendingNativeCommands","_onAndroidCallback","useNativeBridge","_setNativeRef","nativeRef","filter","res","getFilter","isAndroid","JSON","parse","data","feature","stringify","limit","offset","nativeProps","shallowProps","Object","assign","shape","_getShape","undefined","toJSONString","shapeProps","url","hitbox","hasPressListener","onPress","onMapboxShapeSourcePress","cluster","clusterRadius","clusterMinPoints","clusterMaxZoomLevel","clusterProperties","maxZoomLevel","buffer","tolerance","lineMetrics","onAndroidCallback","jsx","MLRNShapeSource","children","cloneReactChildrenWithProps","sourceID","requireNativeComponent"],"sourceRoot":"../../../../src","sources":["components/sources/ShapeSource.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,gBAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAAoD,IAAAK,WAAA,GAAAL,OAAA;AAEpD,MAAMM,UAAU,GAAGC,0BAAa,CAACD,UAAU;AACpC,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,iBAAiB;AA2InD;AACA;AACA;AACA;AACO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,gBAAG,IAAAC,WAAI,eAC7B,IAAAC,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AACK,cAAc,CAACoB,YAAY,CAAC;EACjD;EAEA,SAASI,SAASA,CAAA,EAAuB;IACvC,IAAI,CAACjC,KAAK,CAACgC,KAAK,EAAE;MAChB,OAAOE,SAAS;IAClB;IACA,OAAO,IAAAC,mBAAY,EAACnC,KAAK,CAACgC,KAAK,CAAC;EAClC;EAEA,MAAMI,UAAU,GAAG;IACjBxC,EAAE,EAAEC,OAAO;IACXwC,
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_useNativeBridge","_index","_filterUtils","_jsxRuntime","MLRNModule","NativeModules","NATIVE_MODULE_NAME","exports","ShapeSource","memo","forwardRef","id","shapeId","StyleSource","DefaultSourceID","props","ref","useImperativeHandle","_nativeRef","current","features","getClusterExpansionZoom","getClusterLeaves","getClusterChildren","setNativeProps","useRef","_runNativeCommand","_runPendingNativeCommands","_onAndroidCallback","useNativeBridge","_setNativeRef","nativeRef","filter","res","getFilter","isAndroid","JSON","parse","data","feature","stringify","limit","offset","nativeProps","shallowProps","Object","assign","shape","_getShape","undefined","toJSONString","shapeProps","testID","url","hitbox","hasPressListener","onPress","onMapboxShapeSourcePress","cluster","clusterRadius","clusterMinPoints","clusterMaxZoomLevel","clusterProperties","maxZoomLevel","buffer","tolerance","lineMetrics","onAndroidCallback","jsx","MLRNShapeSource","children","cloneReactChildrenWithProps","sourceID","requireNativeComponent"],"sourceRoot":"../../../../src","sources":["components/sources/ShapeSource.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,gBAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAAoD,IAAAK,WAAA,GAAAL,OAAA;AAEpD,MAAMM,UAAU,GAAGC,0BAAa,CAACD,UAAU;AACpC,MAAME,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,iBAAiB;AA2InD;AACA;AACA;AACA;AACO,M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B,IAAAC,kCAA2B,EAACxD,KAAK,CAACuD,QAAQ,EAAE;MAC3CE,QAAQ,EAAE5D;IACZ,CAAC;EAAC,CACa,CAAC;AAEtB,CACF,CACF,CAAC;AAED,MAAMyD,eAAe,GAAG,IAAAI,mCAAsB,EAAcnE,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NativeUserLocation = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _UserLocationNativeComponent = _interopRequireDefault(require("./UserLocationNativeComponent"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
const NativeUserLocation = props => {
|
|
11
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
11
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserLocationNativeComponent.default, {
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
exports.NativeUserLocation = NativeUserLocation;
|
|
16
|
-
const MLRNNativeUserLocation = (0, _reactNative.requireNativeComponent)(NATIVE_MODULE_NAME);
|
|
17
16
|
//# sourceMappingURL=NativeUserLocation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_UserLocationNativeComponent","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","NativeUserLocation","props","jsx","exports"],"sourceRoot":"../../../../src","sources":["components/user-location/NativeUserLocation.tsx"],"mappings":";;;;;;AAAA,IAAAA,4BAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAwE,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyBjE,MAAMG,kBAAkB,GAAIC,KAA8B,IAAK;EACpE,oBAAO,IAAAL,WAAA,CAAAM,GAAA,EAACT,4BAAA,CAAAM,OAA2B;IAAA,GAAKE;EAAK,CAAG,CAAC;AACnD,CAAC;AAACE,OAAA,CAAAH,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -3,154 +3,44 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.UserLocation = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _NativeUserLocation = require("./NativeUserLocation.js");
|
|
9
8
|
var _UserLocationPuck = require("./UserLocationPuck.js");
|
|
10
|
-
var
|
|
9
|
+
var _useCurrentPosition = require("../../hooks/useCurrentPosition.js");
|
|
11
10
|
var _Annotation = require("../annotations/Annotation.js");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const
|
|
14
|
-
let UserLocationRenderMode = exports.UserLocationRenderMode = /*#__PURE__*/function (UserLocationRenderMode) {
|
|
15
|
-
UserLocationRenderMode["Native"] = "native";
|
|
16
|
-
UserLocationRenderMode["Normal"] = "normal";
|
|
17
|
-
return UserLocationRenderMode;
|
|
18
|
-
}({});
|
|
19
|
-
const UserLocation = exports.UserLocation = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(({
|
|
12
|
+
const UserLocation = exports.UserLocation = /*#__PURE__*/(0, _react.memo)(({
|
|
20
13
|
animated = true,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
minDisplacement
|
|
24
|
-
renderMode = "normal",
|
|
25
|
-
androidRenderMode,
|
|
26
|
-
androidPreferredFramesPerSecond,
|
|
14
|
+
accuracy = false,
|
|
15
|
+
heading = false,
|
|
16
|
+
minDisplacement,
|
|
27
17
|
children,
|
|
28
|
-
onUpdate,
|
|
29
18
|
onPress
|
|
30
|
-
}
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const [userLocationState, setUserLocationState] = (0, _react.useState)({
|
|
34
|
-
shouldShowUserLocation: false
|
|
19
|
+
}) => {
|
|
20
|
+
const currentPosition = (0, _useCurrentPosition.useCurrentPosition)({
|
|
21
|
+
minDisplacement
|
|
35
22
|
});
|
|
36
|
-
(0, _react.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* Notice, that listening will start automatically when
|
|
41
|
-
* either `onUpdate` or `visible` are set
|
|
42
|
-
*
|
|
43
|
-
* @async
|
|
44
|
-
* @param {{running: boolean}} running - Object with key `running` and `boolean` value
|
|
45
|
-
* @return {Promise<void>}
|
|
46
|
-
*/
|
|
47
|
-
setLocationManager,
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* If LocationManager should be running
|
|
51
|
-
*
|
|
52
|
-
* @return {boolean}
|
|
53
|
-
*/
|
|
54
|
-
needsLocationManagerRunning,
|
|
55
|
-
_onLocationUpdate
|
|
56
|
-
}));
|
|
57
|
-
(0, _react.useEffect)(() => {
|
|
58
|
-
_isMounted.current = true;
|
|
59
|
-
setLocationManager({
|
|
60
|
-
running: needsLocationManagerRunning()
|
|
61
|
-
}).then(() => {
|
|
62
|
-
if (renderMode === UserLocationRenderMode.Native) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
_LocationManager.LocationManager.setMinDisplacement(minDisplacement);
|
|
66
|
-
});
|
|
67
|
-
return () => {
|
|
68
|
-
_isMounted.current = false;
|
|
69
|
-
setLocationManager({
|
|
70
|
-
running: false
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
-
}, []);
|
|
75
|
-
(0, _react.useEffect)(() => {
|
|
76
|
-
_LocationManager.LocationManager.setMinDisplacement(minDisplacement);
|
|
77
|
-
}, [minDisplacement]);
|
|
78
|
-
(0, _react.useEffect)(() => {
|
|
79
|
-
if (!_isMounted.current) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
setLocationManager({
|
|
83
|
-
running: needsLocationManagerRunning()
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
async function setLocationManager({
|
|
87
|
-
running
|
|
88
|
-
}) {
|
|
89
|
-
if (locationManagerRunning.current !== running) {
|
|
90
|
-
locationManagerRunning.current = running;
|
|
91
|
-
if (running) {
|
|
92
|
-
_LocationManager.LocationManager.addListener(_onLocationUpdate);
|
|
93
|
-
const location = await _LocationManager.LocationManager.getCurrentPosition();
|
|
94
|
-
_onLocationUpdate(location);
|
|
95
|
-
} else {
|
|
96
|
-
_LocationManager.LocationManager.removeListener(_onLocationUpdate);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function needsLocationManagerRunning() {
|
|
101
|
-
return !!(!!onUpdate || renderMode === UserLocationRenderMode.Normal && visible);
|
|
102
|
-
}
|
|
103
|
-
function _onLocationUpdate(location) {
|
|
104
|
-
if (!_isMounted.current || !location) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
let coordinates;
|
|
108
|
-
let heading;
|
|
109
|
-
if (location && location.coords) {
|
|
110
|
-
const {
|
|
111
|
-
longitude,
|
|
112
|
-
latitude
|
|
113
|
-
} = location.coords;
|
|
114
|
-
heading = location.coords.heading;
|
|
115
|
-
coordinates = [longitude, latitude];
|
|
116
|
-
}
|
|
117
|
-
setUserLocationState({
|
|
118
|
-
...userLocationState,
|
|
119
|
-
coordinates,
|
|
120
|
-
heading
|
|
121
|
-
});
|
|
122
|
-
if (onUpdate) {
|
|
123
|
-
onUpdate(location);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (!visible) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
if (renderMode === UserLocationRenderMode.Native) {
|
|
130
|
-
const props = {
|
|
131
|
-
androidRenderMode,
|
|
132
|
-
iosShowsUserHeadingIndicator: showsUserHeadingIndicator,
|
|
133
|
-
androidPreferredFramesPerSecond
|
|
134
|
-
};
|
|
135
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NativeUserLocation.NativeUserLocation, {
|
|
136
|
-
...props
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
if (!userLocationState.coordinates) {
|
|
23
|
+
const coordinates = (0, _react.useMemo)(() => {
|
|
24
|
+
return currentPosition?.coords ? [currentPosition.coords.longitude, currentPosition.coords.latitude] : undefined;
|
|
25
|
+
}, [currentPosition?.coords]);
|
|
26
|
+
if (!coordinates || !currentPosition) {
|
|
140
27
|
return null;
|
|
141
28
|
}
|
|
142
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Annotation.Annotation, {
|
|
143
30
|
animated: animated,
|
|
144
|
-
id:
|
|
31
|
+
id: "mlrn-user-location",
|
|
32
|
+
testID: "mlrn-user-location",
|
|
145
33
|
onPress: onPress,
|
|
146
|
-
coordinates:
|
|
34
|
+
coordinates: coordinates,
|
|
147
35
|
style: {
|
|
148
|
-
iconRotate:
|
|
36
|
+
iconRotate: currentPosition.coords.heading ?? undefined
|
|
149
37
|
},
|
|
150
38
|
children: children || /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserLocationPuck.UserLocationPuck, {
|
|
151
|
-
|
|
152
|
-
|
|
39
|
+
testID: "mlrn-user-location-puck",
|
|
40
|
+
sourceID: "mlrn-user-location",
|
|
41
|
+
accuracy: accuracy ? currentPosition.coords.accuracy : undefined,
|
|
42
|
+
heading: heading ? currentPosition.coords.heading ?? undefined : undefined
|
|
153
43
|
})
|
|
154
44
|
});
|
|
155
|
-
})
|
|
45
|
+
});
|
|
156
46
|
//# sourceMappingURL=UserLocation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_UserLocationPuck","_useCurrentPosition","_Annotation","_jsxRuntime","UserLocation","exports","memo","animated","accuracy","heading","minDisplacement","children","onPress","currentPosition","useCurrentPosition","coordinates","useMemo","coords","longitude","latitude","undefined","jsx","Annotation","id","testID","style","iconRotate","UserLocationPuck","sourceID"],"sourceRoot":"../../../../src","sources":["components/user-location/UserLocation.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAuD,IAAAI,WAAA,GAAAJ,OAAA;AAkChD,MAAMK,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,WAAI,EAC9B,CAAC;EACCC,QAAQ,GAAG,IAAI;EACfC,QAAQ,GAAG,KAAK;EAChBC,OAAO,GAAG,KAAK;EACfC,eAAe;EACfC,QAAQ;EACRC;AACiB,CAAC,KAAK;EACvB,MAAMC,eAAe,GAAG,IAAAC,sCAAkB,EAAC;IAAEJ;EAAgB,CAAC,CAAC;EAE/D,MAAMK,WAAW,GAAG,IAAAC,cAAO,EAAC,MAAM;IAChC,OAAOH,eAAe,EAAEI,MAAM,GAC1B,CAACJ,eAAe,CAACI,MAAM,CAACC,SAAS,EAAEL,eAAe,CAACI,MAAM,CAACE,QAAQ,CAAC,GACnEC,SAAS;EACf,CAAC,EAAE,CAACP,eAAe,EAAEI,MAAM,CAAC,CAAC;EAE7B,IAAI,CAACF,WAAW,IAAI,CAACF,eAAe,EAAE;IACpC,OAAO,IAAI;EACb;EAEA,oBACE,IAAAV,WAAA,CAAAkB,GAAA,EAACnB,WAAA,CAAAoB,UAAU;IACTf,QAAQ,EAAEA,QAAS;IACnBgB,EAAE,EAAC,oBAAoB;IACvBC,MAAM,EAAC,oBAAoB;IAC3BZ,OAAO,EAAEA,OAAQ;IACjBG,WAAW,EAAEA,WAAY;IACzBU,KAAK,EAAE;MACLC,UAAU,EAAEb,eAAe,CAACI,MAAM,CAACR,OAAO,IAAIW;IAChD,CAAE;IAAAT,QAAA,EAEDA,QAAQ,iBACP,IAAAR,WAAA,CAAAkB,GAAA,EAACrB,iBAAA,CAAA2B,gBAAgB;MACfH,MAAM,EAAC,yBAAyB;MAChCI,QAAQ,EAAC,oBAAoB;MAC7BpB,QAAQ,EAAEA,QAAQ,GAAGK,eAAe,CAACI,MAAM,CAACT,QAAQ,GAAGY,SAAU;MACjEX,OAAO,EACLA,OAAO,GACFI,eAAe,CAACI,MAAM,CAACR,OAAO,IAAIW,SAAS,GAC5CA;IACL,CACF;EACF,CACS,CAAC;AAEjB,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
codegenNativeComponent,
|
|
3
|
+
type CodegenTypes,
|
|
4
|
+
type HostComponent,
|
|
5
|
+
type ViewProps,
|
|
6
|
+
} from "react-native";
|
|
7
|
+
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
mode?: CodegenTypes.WithDefault<"default" | "heading" | "course", "default">;
|
|
10
|
+
|
|
11
|
+
androidPreferredFramesPerSecond?: CodegenTypes.WithDefault<
|
|
12
|
+
CodegenTypes.Int32,
|
|
13
|
+
-1
|
|
14
|
+
>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default codegenNativeComponent<NativeProps>(
|
|
18
|
+
"MLRNNativeUserLocation",
|
|
19
|
+
) as HostComponent<NativeProps>;
|
|
@@ -10,11 +10,14 @@ var _CircleLayer = require("../layers/CircleLayer.js");
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const blue = "#33B5E5";
|
|
12
12
|
const layerStyles = {
|
|
13
|
-
|
|
14
|
-
circleRadius: 15,
|
|
13
|
+
accuracy: {
|
|
15
14
|
circleColor: blue,
|
|
16
15
|
circleOpacity: 0.2,
|
|
17
|
-
circlePitchAlignment: "map"
|
|
16
|
+
circlePitchAlignment: "map",
|
|
17
|
+
circleRadiusTransition: {
|
|
18
|
+
duration: 300,
|
|
19
|
+
delay: 0
|
|
20
|
+
}
|
|
18
21
|
},
|
|
19
22
|
white: {
|
|
20
23
|
circleRadius: 9,
|
|
@@ -29,24 +32,33 @@ const layerStyles = {
|
|
|
29
32
|
};
|
|
30
33
|
const UserLocationPuck = exports.UserLocationPuck = /*#__PURE__*/(0, _react.memo)(({
|
|
31
34
|
sourceID,
|
|
35
|
+
accuracy,
|
|
32
36
|
heading
|
|
33
|
-
}) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
}) => {
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
39
|
+
children: [typeof accuracy === "number" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircleLayer.CircleLayer, {
|
|
40
|
+
id: "mlrn-user-location-puck-accuracy",
|
|
41
|
+
testID: "mlrn-user-location-puck-accuracy",
|
|
42
|
+
sourceID: sourceID,
|
|
43
|
+
style: {
|
|
44
|
+
...layerStyles.accuracy,
|
|
45
|
+
circleRadius: ["interpolate", ["exponential", 2], ["zoom"], 0, layerStyles.white.circleRadius, 22, layerStyles.white.circleRadius + accuracy * 100]
|
|
46
|
+
}
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircleLayer.CircleLayer, {
|
|
48
|
+
id: "mlrn-user-location-puck-white",
|
|
49
|
+
testID: "mlrn-user-location-puck-white",
|
|
50
|
+
sourceID: sourceID,
|
|
51
|
+
style: layerStyles.white
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircleLayer.CircleLayer, {
|
|
53
|
+
id: "mlrn-user-location-puck-blue",
|
|
54
|
+
testID: "mlrn-user-location-puck-blue",
|
|
55
|
+
sourceID: sourceID,
|
|
56
|
+
style: layerStyles.blue
|
|
57
|
+
}), typeof heading === "number" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UserLocationPuckHeading.UserLocationPuckHeading, {
|
|
58
|
+
sourceID: sourceID,
|
|
59
|
+
belowLayerID: "mlrn-user-location-puck-white",
|
|
60
|
+
heading: heading
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
});
|
|
52
64
|
//# sourceMappingURL=UserLocationPuck.js.map
|