@lugg/maps 0.2.0-alpha.0 → 0.2.0-alpha.1

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 (108) hide show
  1. package/android/src/main/java/com/luggmaps/{LuggMapsGoogleMapView.kt → LuggGoogleMapView.kt} +81 -28
  2. package/android/src/main/java/com/luggmaps/{LuggMapsGoogleMapViewManager.kt → LuggGoogleMapViewManager.kt} +57 -38
  3. package/android/src/main/java/com/luggmaps/{LuggMapsWrapperView.kt → LuggMapWrapperView.kt} +1 -1
  4. package/android/src/main/java/com/luggmaps/LuggMapWrapperViewManager.kt +25 -0
  5. package/android/src/main/java/com/luggmaps/{LuggMapsMarkerView.kt → LuggMarkerView.kt} +6 -6
  6. package/android/src/main/java/com/luggmaps/{LuggMapsMarkerViewManager.kt → LuggMarkerViewManager.kt} +17 -17
  7. package/android/src/main/java/com/luggmaps/{LuggMapsPackage.kt → LuggPackage.kt} +2 -2
  8. package/android/src/main/java/com/luggmaps/{LuggMapsPolylineView.kt → LuggPolylineView.kt} +4 -4
  9. package/android/src/main/java/com/luggmaps/{LuggMapsPolylineViewManager.kt → LuggPolylineViewManager.kt} +16 -16
  10. package/android/src/main/java/com/luggmaps/events/CameraIdleEvent.kt +10 -2
  11. package/android/src/main/java/com/luggmaps/events/CameraMoveEvent.kt +6 -5
  12. package/android/src/main/java/com/luggmaps/events/ReadyEvent.kt +12 -0
  13. package/android/src/main/java/com/luggmaps/extensions/ViewExtensions.kt +14 -0
  14. package/ios/{LuggMapsAppleMapView.h → LuggAppleMapView.h} +2 -2
  15. package/ios/{LuggMapsAppleMapView.mm → LuggAppleMapView.mm} +95 -66
  16. package/ios/{LuggMapsGoogleMapView.h → LuggGoogleMapView.h} +1 -1
  17. package/ios/{LuggMapsGoogleMapView.mm → LuggGoogleMapView.mm} +64 -58
  18. package/ios/{LuggMapsWrapperView.h → LuggMapWrapperView.h} +1 -1
  19. package/ios/{LuggMapsWrapperView.mm → LuggMapWrapperView.mm} +7 -7
  20. package/ios/{LuggMapsMarkerView.h → LuggMarkerView.h} +6 -6
  21. package/ios/{LuggMapsMarkerView.mm → LuggMarkerView.mm} +8 -8
  22. package/ios/{LuggMapsPolylineView.h → LuggPolylineView.h} +5 -5
  23. package/ios/{LuggMapsPolylineView.mm → LuggPolylineView.mm} +8 -8
  24. package/ios/events/CameraIdleEvent.h +6 -1
  25. package/ios/events/CameraMoveEvent.h +6 -3
  26. package/ios/events/ReadyEvent.h +20 -0
  27. package/lib/module/MapView.js +13 -5
  28. package/lib/module/MapView.js.map +1 -1
  29. package/lib/module/{Marker.js → components/Marker.js} +2 -2
  30. package/lib/module/components/Marker.js.map +1 -0
  31. package/lib/module/{Polyline.js → components/Polyline.js} +2 -2
  32. package/lib/module/components/Polyline.js.map +1 -0
  33. package/lib/module/components/index.js +5 -0
  34. package/lib/module/components/index.js.map +1 -0
  35. package/{src/fabric/LuggMapsAppleMapViewNativeComponent.ts → lib/module/fabric/LuggAppleMapViewNativeComponent.ts} +9 -2
  36. package/lib/module/fabric/{LuggMapsGoogleMapViewNativeComponent.ts → LuggGoogleMapViewNativeComponent.ts} +9 -2
  37. package/{src/fabric/LuggMapsWrapperViewNativeComponent.ts → lib/module/fabric/LuggMapWrapperViewNativeComponent.ts} +1 -1
  38. package/lib/module/fabric/{LuggMapsMarkerViewNativeComponent.ts → LuggMarkerViewNativeComponent.ts} +1 -1
  39. package/{src/fabric/LuggMapsPolylineViewNativeComponent.ts → lib/module/fabric/LuggPolylineViewNativeComponent.ts} +1 -1
  40. package/lib/module/index.js +1 -2
  41. package/lib/module/index.js.map +1 -1
  42. package/lib/typescript/plugin/src/withLuggMapsAndroid.d.ts +6 -0
  43. package/lib/typescript/plugin/src/withLuggMapsAndroid.d.ts.map +1 -0
  44. package/lib/typescript/plugin/src/withLuggMapsIOS.d.ts +6 -0
  45. package/lib/typescript/plugin/src/withLuggMapsIOS.d.ts.map +1 -0
  46. package/lib/typescript/src/MapView.d.ts.map +1 -1
  47. package/lib/typescript/src/MapView.types.d.ts +23 -12
  48. package/lib/typescript/src/MapView.types.d.ts.map +1 -1
  49. package/lib/typescript/src/{Marker.types.d.ts → components/Marker.d.ts} +6 -5
  50. package/lib/typescript/src/components/Marker.d.ts.map +1 -0
  51. package/lib/typescript/src/{Polyline.types.d.ts → components/Polyline.d.ts} +6 -5
  52. package/lib/typescript/src/components/Polyline.d.ts.map +1 -0
  53. package/lib/typescript/src/components/index.d.ts +3 -0
  54. package/lib/typescript/src/components/index.d.ts.map +1 -0
  55. package/lib/typescript/src/fabric/{LuggMapsAppleMapViewNativeComponent.d.ts → LuggAppleMapViewNativeComponent.d.ts} +9 -2
  56. package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts.map +1 -0
  57. package/lib/typescript/src/fabric/{LuggMapsGoogleMapViewNativeComponent.d.ts → LuggGoogleMapViewNativeComponent.d.ts} +9 -2
  58. package/lib/typescript/src/fabric/LuggGoogleMapViewNativeComponent.d.ts.map +1 -0
  59. package/lib/typescript/src/fabric/{LuggMapsWrapperViewNativeComponent.d.ts → LuggMapWrapperViewNativeComponent.d.ts} +1 -1
  60. package/lib/typescript/src/fabric/LuggMapWrapperViewNativeComponent.d.ts.map +1 -0
  61. package/lib/typescript/src/fabric/{LuggMapsMarkerViewNativeComponent.d.ts → LuggMarkerViewNativeComponent.d.ts} +1 -1
  62. package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -0
  63. package/lib/typescript/src/fabric/{LuggMapsPolylineViewNativeComponent.d.ts → LuggPolylineViewNativeComponent.d.ts} +1 -1
  64. package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts.map +1 -0
  65. package/lib/typescript/src/index.d.ts +2 -5
  66. package/lib/typescript/src/index.d.ts.map +1 -1
  67. package/package.json +6 -6
  68. package/plugin/build/index.js +4 -4
  69. package/{lib/typescript/plugin/src/withMapsAndroid.d.ts → plugin/build/withLuggMapsAndroid.d.ts} +0 -1
  70. package/plugin/build/withLuggMapsAndroid.js +15 -0
  71. package/{lib/typescript/plugin/src/withMapsIOS.d.ts → plugin/build/withLuggMapsIOS.d.ts} +0 -1
  72. package/plugin/build/withLuggMapsIOS.js +27 -0
  73. package/plugin/build/withMapsAndroid.d.ts +1 -1
  74. package/plugin/build/withMapsIOS.d.ts +1 -1
  75. package/src/MapView.tsx +16 -8
  76. package/src/MapView.types.ts +23 -13
  77. package/src/components/Marker.tsx +59 -0
  78. package/src/{Polyline.tsx → components/Polyline.tsx} +23 -3
  79. package/src/components/index.ts +2 -0
  80. package/{lib/module/fabric/LuggMapsAppleMapViewNativeComponent.ts → src/fabric/LuggAppleMapViewNativeComponent.ts} +9 -2
  81. package/src/fabric/{LuggMapsGoogleMapViewNativeComponent.ts → LuggGoogleMapViewNativeComponent.ts} +9 -2
  82. package/{lib/module/fabric/LuggMapsWrapperViewNativeComponent.ts → src/fabric/LuggMapWrapperViewNativeComponent.ts} +1 -1
  83. package/src/fabric/{LuggMapsMarkerViewNativeComponent.ts → LuggMarkerViewNativeComponent.ts} +1 -1
  84. package/{lib/module/fabric/LuggMapsPolylineViewNativeComponent.ts → src/fabric/LuggPolylineViewNativeComponent.ts} +1 -1
  85. package/src/index.ts +3 -6
  86. package/android/src/main/java/com/luggmaps/LuggMapsWrapperViewManager.kt +0 -25
  87. package/lib/module/Marker.js.map +0 -1
  88. package/lib/module/Marker.types.js +0 -4
  89. package/lib/module/Marker.types.js.map +0 -1
  90. package/lib/module/Polyline.js.map +0 -1
  91. package/lib/module/Polyline.types.js +0 -4
  92. package/lib/module/Polyline.types.js.map +0 -1
  93. package/lib/typescript/plugin/src/withMapsAndroid.d.ts.map +0 -1
  94. package/lib/typescript/plugin/src/withMapsIOS.d.ts.map +0 -1
  95. package/lib/typescript/src/Marker.d.ts +0 -6
  96. package/lib/typescript/src/Marker.d.ts.map +0 -1
  97. package/lib/typescript/src/Marker.types.d.ts.map +0 -1
  98. package/lib/typescript/src/Polyline.d.ts +0 -6
  99. package/lib/typescript/src/Polyline.d.ts.map +0 -1
  100. package/lib/typescript/src/Polyline.types.d.ts.map +0 -1
  101. package/lib/typescript/src/fabric/LuggMapsAppleMapViewNativeComponent.d.ts.map +0 -1
  102. package/lib/typescript/src/fabric/LuggMapsGoogleMapViewNativeComponent.d.ts.map +0 -1
  103. package/lib/typescript/src/fabric/LuggMapsMarkerViewNativeComponent.d.ts.map +0 -1
  104. package/lib/typescript/src/fabric/LuggMapsPolylineViewNativeComponent.d.ts.map +0 -1
  105. package/lib/typescript/src/fabric/LuggMapsWrapperViewNativeComponent.d.ts.map +0 -1
  106. package/src/Marker.tsx +0 -31
  107. package/src/Marker.types.ts +0 -32
  108. package/src/Polyline.types.ts +0 -24
@@ -1,10 +1,11 @@
1
- #import "LuggMapsGoogleMapView.h"
2
- #import "LuggMapsMarkerView.h"
3
- #import "LuggMapsPolylineView.h"
1
+ #import "LuggGoogleMapView.h"
2
+ #import "LuggMarkerView.h"
3
+ #import "LuggPolylineView.h"
4
4
  #import "core/GMSPolylineAnimator.h"
5
5
  #import "core/PolylineAnimatorBase.h"
6
6
  #import "events/CameraIdleEvent.h"
7
7
  #import "events/CameraMoveEvent.h"
8
+ #import "events/ReadyEvent.h"
8
9
 
9
10
  #import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
10
11
  #import <react/renderer/components/RNMapsSpec/EventEmitters.h>
@@ -16,35 +17,35 @@
16
17
  using namespace facebook::react;
17
18
  using namespace luggmaps::events;
18
19
 
19
- #import "LuggMapsWrapperView.h"
20
+ #import "LuggMapWrapperView.h"
20
21
 
21
22
  static NSString *const kDemoMapId = @"DEMO_MAP_ID";
22
23
 
23
- @interface LuggMapsGoogleMapView () <
24
- RCTLuggMapsGoogleMapViewViewProtocol, GMSMapViewDelegate,
25
- LuggMapsMarkerViewDelegate, LuggMapsPolylineViewDelegate>
24
+ @interface LuggGoogleMapView () <RCTLuggGoogleMapViewViewProtocol,
25
+ GMSMapViewDelegate, LuggMarkerViewDelegate,
26
+ LuggPolylineViewDelegate>
26
27
  @end
27
28
 
28
- @implementation LuggMapsGoogleMapView {
29
+ @implementation LuggGoogleMapView {
29
30
  GMSMapView *_mapView;
30
- LuggMapsWrapperView *_mapWrapperView;
31
+ LuggMapWrapperView *_mapWrapperView;
31
32
  BOOL _isMapReady;
32
33
  BOOL _isDragging;
33
34
  NSString *_mapId;
34
- NSMutableArray<LuggMapsMarkerView *> *_pendingMarkerViews;
35
- NSMutableArray<LuggMapsPolylineView *> *_pendingPolylineViews;
36
- NSMapTable<LuggMapsPolylineView *, GMSPolylineAnimator *> *_polylineAnimators;
35
+ NSMutableArray<LuggMarkerView *> *_pendingMarkerViews;
36
+ NSMutableArray<LuggPolylineView *> *_pendingPolylineViews;
37
+ NSMapTable<LuggPolylineView *, GMSPolylineAnimator *> *_polylineAnimators;
37
38
  }
38
39
 
39
40
  + (ComponentDescriptorProvider)componentDescriptorProvider {
40
41
  return concreteComponentDescriptorProvider<
41
- LuggMapsGoogleMapViewComponentDescriptor>();
42
+ LuggGoogleMapViewComponentDescriptor>();
42
43
  }
43
44
 
44
45
  - (instancetype)initWithFrame:(CGRect)frame {
45
46
  if (self = [super initWithFrame:frame]) {
46
47
  static const auto defaultProps =
47
- std::make_shared<const LuggMapsGoogleMapViewProps>();
48
+ std::make_shared<const LuggGoogleMapViewProps>();
48
49
  _props = defaultProps;
49
50
 
50
51
  _isMapReady = NO;
@@ -64,15 +65,14 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
64
65
  index:(NSInteger)index {
65
66
  [super mountChildComponentView:childComponentView index:index];
66
67
 
67
- if ([childComponentView isKindOfClass:[LuggMapsWrapperView class]]) {
68
- _mapWrapperView = (LuggMapsWrapperView *)childComponentView;
69
- } else if ([childComponentView isKindOfClass:[LuggMapsMarkerView class]]) {
70
- LuggMapsMarkerView *markerView = (LuggMapsMarkerView *)childComponentView;
68
+ if ([childComponentView isKindOfClass:[LuggMapWrapperView class]]) {
69
+ _mapWrapperView = (LuggMapWrapperView *)childComponentView;
70
+ } else if ([childComponentView isKindOfClass:[LuggMarkerView class]]) {
71
+ LuggMarkerView *markerView = (LuggMarkerView *)childComponentView;
71
72
  markerView.delegate = self;
72
73
  [self syncMarkerView:markerView caller:@"mountChildComponentView"];
73
- } else if ([childComponentView isKindOfClass:[LuggMapsPolylineView class]]) {
74
- LuggMapsPolylineView *polylineView =
75
- (LuggMapsPolylineView *)childComponentView;
74
+ } else if ([childComponentView isKindOfClass:[LuggPolylineView class]]) {
75
+ LuggPolylineView *polylineView = (LuggPolylineView *)childComponentView;
76
76
  polylineView.delegate = self;
77
77
  [self syncPolylineView:polylineView];
78
78
  }
@@ -81,17 +81,16 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
81
81
  - (void)unmountChildComponentView:
82
82
  (UIView<RCTComponentViewProtocol> *)childComponentView
83
83
  index:(NSInteger)index {
84
- if ([childComponentView isKindOfClass:[LuggMapsMarkerView class]]) {
85
- LuggMapsMarkerView *markerView = (LuggMapsMarkerView *)childComponentView;
84
+ if ([childComponentView isKindOfClass:[LuggMarkerView class]]) {
85
+ LuggMarkerView *markerView = (LuggMarkerView *)childComponentView;
86
86
  GMSAdvancedMarker *marker = (GMSAdvancedMarker *)markerView.marker;
87
87
  if (marker) {
88
88
  marker.iconView = nil;
89
89
  marker.map = nil;
90
90
  markerView.marker = nil;
91
91
  }
92
- } else if ([childComponentView isKindOfClass:[LuggMapsPolylineView class]]) {
93
- LuggMapsPolylineView *polylineView =
94
- (LuggMapsPolylineView *)childComponentView;
92
+ } else if ([childComponentView isKindOfClass:[LuggPolylineView class]]) {
93
+ LuggPolylineView *polylineView = (LuggPolylineView *)childComponentView;
95
94
  [_polylineAnimators removeObjectForKey:polylineView];
96
95
  GMSPolyline *polyline = (GMSPolyline *)polylineView.polyline;
97
96
  if (polyline) {
@@ -131,7 +130,7 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
131
130
  }
132
131
 
133
132
  const auto &viewProps =
134
- *std::static_pointer_cast<LuggMapsGoogleMapViewProps const>(_props);
133
+ *std::static_pointer_cast<LuggGoogleMapViewProps const>(_props);
135
134
 
136
135
  GMSMapID *gmsMapId;
137
136
  if ([_mapId isEqualToString:kDemoMapId] || _mapId.length == 0) {
@@ -160,12 +159,22 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
160
159
  _mapView.settings.scrollGestures = viewProps.scrollEnabled;
161
160
  _mapView.settings.rotateGestures = viewProps.rotateEnabled;
162
161
  _mapView.settings.tiltGestures = viewProps.pitchEnabled;
162
+ _mapView.myLocationEnabled = viewProps.userLocationEnabled;
163
+
164
+ if (viewProps.minZoom > 0) {
165
+ [_mapView setMinZoom:(float)viewProps.minZoom maxZoom:_mapView.maxZoom];
166
+ }
167
+ if (viewProps.maxZoom > 0) {
168
+ [_mapView setMinZoom:_mapView.minZoom maxZoom:(float)viewProps.maxZoom];
169
+ }
163
170
 
164
171
  [_mapWrapperView addSubview:_mapView];
165
172
 
166
173
  _isMapReady = YES;
167
174
  [self processPendingMarkers];
168
175
  [self processPendingPolylines];
176
+
177
+ ReadyEvent::emit<LuggGoogleMapViewEventEmitter>(_eventEmitter);
169
178
  }
170
179
 
171
180
  - (GMSMapView *)mapView {
@@ -180,49 +189,39 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
180
189
 
181
190
  - (void)mapView:(GMSMapView *)mapView
182
191
  didChangeCameraPosition:(GMSCameraPosition *)position {
183
- if (_eventEmitter) {
184
- auto emitter =
185
- std::static_pointer_cast<LuggMapsGoogleMapViewEventEmitter const>(
186
- _eventEmitter);
187
- CameraMoveEvent{position.target.latitude, position.target.longitude,
188
- position.zoom, _isDragging}
189
- .emit(emitter);
190
- }
192
+ CameraMoveEvent{position.target.latitude, position.target.longitude,
193
+ position.zoom, _isDragging}
194
+ .emit<LuggGoogleMapViewEventEmitter>(_eventEmitter);
191
195
  }
192
196
 
193
197
  - (void)mapView:(GMSMapView *)mapView
194
198
  idleAtCameraPosition:(GMSCameraPosition *)position {
199
+ BOOL wasDragging = _isDragging;
195
200
  _isDragging = NO;
196
- if (_eventEmitter) {
197
- auto emitter =
198
- std::static_pointer_cast<LuggMapsGoogleMapViewEventEmitter const>(
199
- _eventEmitter);
200
- CameraIdleEvent{position.target.latitude, position.target.longitude,
201
- position.zoom}
202
- .emit(emitter);
203
- }
201
+ CameraIdleEvent{position.target.latitude, position.target.longitude,
202
+ position.zoom, static_cast<bool>(wasDragging)}
203
+ .emit<LuggGoogleMapViewEventEmitter>(_eventEmitter);
204
204
  }
205
205
 
206
206
  #pragma mark - PolylineViewDelegate
207
207
 
208
- - (void)polylineViewDidUpdate:(LuggMapsPolylineView *)polylineView {
208
+ - (void)polylineViewDidUpdate:(LuggPolylineView *)polylineView {
209
209
  [self syncPolylineView:polylineView];
210
210
  }
211
211
 
212
212
  #pragma mark - MarkerViewDelegate
213
213
 
214
- - (void)markerViewDidLayout:(LuggMapsMarkerView *)markerView {
214
+ - (void)markerViewDidLayout:(LuggMarkerView *)markerView {
215
215
  [self syncMarkerView:markerView caller:@"markerViewDidLayout"];
216
216
  }
217
217
 
218
- - (void)markerViewDidUpdate:(LuggMapsMarkerView *)markerView {
218
+ - (void)markerViewDidUpdate:(LuggMarkerView *)markerView {
219
219
  [self syncMarkerView:markerView caller:@"markerViewDidUpdate"];
220
220
  }
221
221
 
222
222
  #pragma mark - Marker Management
223
223
 
224
- - (void)syncMarkerView:(LuggMapsMarkerView *)markerView
225
- caller:(NSString *)caller {
224
+ - (void)syncMarkerView:(LuggMarkerView *)markerView caller:(NSString *)caller {
226
225
  if (!_mapView) {
227
226
  if (![_pendingMarkerViews containsObject:markerView]) {
228
227
  [_pendingMarkerViews addObject:markerView];
@@ -255,15 +254,15 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
255
254
  return;
256
255
  }
257
256
 
258
- for (LuggMapsMarkerView *markerView in _pendingMarkerViews) {
257
+ for (LuggMarkerView *markerView in _pendingMarkerViews) {
259
258
  [self addMarkerViewToMap:markerView];
260
259
  }
261
260
  [_pendingMarkerViews removeAllObjects];
262
261
  }
263
262
 
264
- - (void)addMarkerViewToMap:(LuggMapsMarkerView *)markerView {
263
+ - (void)addMarkerViewToMap:(LuggMarkerView *)markerView {
265
264
  if (!_mapView) {
266
- RCTLogWarn(@"LuggMaps: addMarkerViewToMap called without a map");
265
+ RCTLogWarn(@"Lugg: addMarkerViewToMap called without a map");
267
266
  return;
268
267
  }
269
268
 
@@ -288,7 +287,7 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
288
287
 
289
288
  #pragma mark - Polyline Management
290
289
 
291
- - (void)syncPolylineView:(LuggMapsPolylineView *)polylineView {
290
+ - (void)syncPolylineView:(LuggPolylineView *)polylineView {
292
291
  if (!_mapView) {
293
292
  if (![_pendingPolylineViews containsObject:polylineView]) {
294
293
  [_pendingPolylineViews addObject:polylineView];
@@ -319,13 +318,13 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
319
318
  return;
320
319
  }
321
320
 
322
- for (LuggMapsPolylineView *polylineView in _pendingPolylineViews) {
321
+ for (LuggPolylineView *polylineView in _pendingPolylineViews) {
323
322
  [self addPolylineViewToMap:polylineView];
324
323
  }
325
324
  [_pendingPolylineViews removeAllObjects];
326
325
  }
327
326
 
328
- - (void)addPolylineViewToMap:(LuggMapsPolylineView *)polylineView {
327
+ - (void)addPolylineViewToMap:(LuggPolylineView *)polylineView {
329
328
  if (!_mapView) {
330
329
  return;
331
330
  }
@@ -350,7 +349,7 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
350
349
  - (void)updateProps:(Props::Shared const &)props
351
350
  oldProps:(Props::Shared const &)oldProps {
352
351
  const auto &newViewProps =
353
- *std::static_pointer_cast<LuggMapsGoogleMapViewProps const>(props);
352
+ *std::static_pointer_cast<LuggGoogleMapViewProps const>(props);
354
353
 
355
354
  if (_mapView == nil) {
356
355
  NSString *newMapId =
@@ -365,9 +364,16 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
365
364
  _mapView.settings.scrollGestures = newViewProps.scrollEnabled;
366
365
  _mapView.settings.rotateGestures = newViewProps.rotateEnabled;
367
366
  _mapView.settings.tiltGestures = newViewProps.pitchEnabled;
367
+ _mapView.myLocationEnabled = newViewProps.userLocationEnabled;
368
368
  _mapView.padding = UIEdgeInsetsMake(
369
369
  newViewProps.padding.top, newViewProps.padding.left,
370
370
  newViewProps.padding.bottom, newViewProps.padding.right);
371
+
372
+ float minZoom = newViewProps.minZoom > 0 ? (float)newViewProps.minZoom
373
+ : _mapView.minZoom;
374
+ float maxZoom = newViewProps.maxZoom > 0 ? (float)newViewProps.maxZoom
375
+ : _mapView.maxZoom;
376
+ [_mapView setMinZoom:minZoom maxZoom:maxZoom];
371
377
  }
372
378
 
373
379
  [super updateProps:props oldProps:oldProps];
@@ -429,11 +435,11 @@ static NSString *const kDemoMapId = @"DEMO_MAP_ID";
429
435
  }
430
436
 
431
437
  - (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args {
432
- RCTLuggMapsGoogleMapViewHandleCommand(self, commandName, args);
438
+ RCTLuggGoogleMapViewHandleCommand(self, commandName, args);
433
439
  }
434
440
 
435
- Class<RCTComponentViewProtocol> LuggMapsGoogleMapViewCls(void) {
436
- return LuggMapsGoogleMapView.class;
441
+ Class<RCTComponentViewProtocol> LuggGoogleMapViewCls(void) {
442
+ return LuggGoogleMapView.class;
437
443
  }
438
444
 
439
445
  @end
@@ -3,7 +3,7 @@
3
3
 
4
4
  NS_ASSUME_NONNULL_BEGIN
5
5
 
6
- @interface LuggMapsWrapperView : RCTViewComponentView
6
+ @interface LuggMapWrapperView : RCTViewComponentView
7
7
  @end
8
8
 
9
9
  NS_ASSUME_NONNULL_END
@@ -1,4 +1,4 @@
1
- #import "LuggMapsWrapperView.h"
1
+ #import "LuggMapWrapperView.h"
2
2
 
3
3
  #import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
4
4
  #import <react/renderer/components/RNMapsSpec/EventEmitters.h>
@@ -9,28 +9,28 @@
9
9
 
10
10
  using namespace facebook::react;
11
11
 
12
- @interface LuggMapsWrapperView () <RCTLuggMapsWrapperViewViewProtocol>
12
+ @interface LuggMapWrapperView () <RCTLuggMapWrapperViewViewProtocol>
13
13
  @end
14
14
 
15
- @implementation LuggMapsWrapperView
15
+ @implementation LuggMapWrapperView
16
16
 
17
17
  + (ComponentDescriptorProvider)componentDescriptorProvider {
18
18
  return concreteComponentDescriptorProvider<
19
- LuggMapsWrapperViewComponentDescriptor>();
19
+ LuggMapWrapperViewComponentDescriptor>();
20
20
  }
21
21
 
22
22
  - (instancetype)initWithFrame:(CGRect)frame {
23
23
  if (self = [super initWithFrame:frame]) {
24
24
  static const auto defaultProps =
25
- std::make_shared<const LuggMapsWrapperViewProps>();
25
+ std::make_shared<const LuggMapWrapperViewProps>();
26
26
  _props = defaultProps;
27
27
  }
28
28
 
29
29
  return self;
30
30
  }
31
31
 
32
- Class<RCTComponentViewProtocol> LuggMapsWrapperViewCls(void) {
33
- return LuggMapsWrapperView.class;
32
+ Class<RCTComponentViewProtocol> LuggMapWrapperViewCls(void) {
33
+ return LuggMapWrapperView.class;
34
34
  }
35
35
 
36
36
  @end
@@ -4,15 +4,15 @@
4
4
 
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
- @class LuggMapsMarkerView;
7
+ @class LuggMarkerView;
8
8
 
9
- @protocol LuggMapsMarkerViewDelegate <NSObject>
9
+ @protocol LuggMarkerViewDelegate <NSObject>
10
10
  @optional
11
- - (void)markerViewDidLayout:(LuggMapsMarkerView *)markerView;
12
- - (void)markerViewDidUpdate:(LuggMapsMarkerView *)markerView;
11
+ - (void)markerViewDidLayout:(LuggMarkerView *)markerView;
12
+ - (void)markerViewDidUpdate:(LuggMarkerView *)markerView;
13
13
  @end
14
14
 
15
- @interface LuggMapsMarkerView : RCTViewComponentView
15
+ @interface LuggMarkerView : RCTViewComponentView
16
16
 
17
17
  @property(nonatomic, readonly) CLLocationCoordinate2D coordinate;
18
18
  @property(nonatomic, readonly, nullable) NSString *title;
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
21
21
  @property(nonatomic, readonly) BOOL hasCustomView;
22
22
  @property(nonatomic, readonly) BOOL didLayout;
23
23
  @property(nonatomic, readonly) UIView *iconView;
24
- @property(nonatomic, weak, nullable) id<LuggMapsMarkerViewDelegate> delegate;
24
+ @property(nonatomic, weak, nullable) id<LuggMarkerViewDelegate> delegate;
25
25
  @property(nonatomic, strong, nullable) NSObject *marker;
26
26
 
27
27
  @end
@@ -1,4 +1,4 @@
1
- #import "LuggMapsMarkerView.h"
1
+ #import "LuggMarkerView.h"
2
2
 
3
3
  #import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
4
4
  #import <react/renderer/components/RNMapsSpec/EventEmitters.h>
@@ -9,10 +9,10 @@
9
9
 
10
10
  using namespace facebook::react;
11
11
 
12
- @interface LuggMapsMarkerView () <RCTLuggMapsMarkerViewViewProtocol>
12
+ @interface LuggMarkerView () <RCTLuggMarkerViewViewProtocol>
13
13
  @end
14
14
 
15
- @implementation LuggMapsMarkerView {
15
+ @implementation LuggMarkerView {
16
16
  CLLocationCoordinate2D _coordinate;
17
17
  NSString *_title;
18
18
  NSString *_markerDescription;
@@ -23,13 +23,13 @@ using namespace facebook::react;
23
23
 
24
24
  + (ComponentDescriptorProvider)componentDescriptorProvider {
25
25
  return concreteComponentDescriptorProvider<
26
- LuggMapsMarkerViewComponentDescriptor>();
26
+ LuggMarkerViewComponentDescriptor>();
27
27
  }
28
28
 
29
29
  - (instancetype)initWithFrame:(CGRect)frame {
30
30
  if (self = [super initWithFrame:frame]) {
31
31
  static const auto defaultProps =
32
- std::make_shared<const LuggMapsMarkerViewProps>();
32
+ std::make_shared<const LuggMarkerViewProps>();
33
33
  _props = defaultProps;
34
34
 
35
35
  _coordinate = CLLocationCoordinate2DMake(0, 0);
@@ -50,7 +50,7 @@ using namespace facebook::react;
50
50
  oldProps:(Props::Shared const &)oldProps {
51
51
  [super updateProps:props oldProps:oldProps];
52
52
  const auto &newViewProps =
53
- *std::static_pointer_cast<LuggMapsMarkerViewProps const>(props);
53
+ *std::static_pointer_cast<LuggMarkerViewProps const>(props);
54
54
 
55
55
  _coordinate = CLLocationCoordinate2DMake(newViewProps.coordinate.latitude,
56
56
  newViewProps.coordinate.longitude);
@@ -147,8 +147,8 @@ using namespace facebook::react;
147
147
  }
148
148
  }
149
149
 
150
- Class<RCTComponentViewProtocol> LuggMapsMarkerViewCls(void) {
151
- return LuggMapsMarkerView.class;
150
+ Class<RCTComponentViewProtocol> LuggMarkerViewCls(void) {
151
+ return LuggMarkerView.class;
152
152
  }
153
153
 
154
154
  @end
@@ -4,20 +4,20 @@
4
4
 
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
- @class LuggMapsPolylineView;
7
+ @class LuggPolylineView;
8
8
 
9
- @protocol LuggMapsPolylineViewDelegate <NSObject>
9
+ @protocol LuggPolylineViewDelegate <NSObject>
10
10
  @optional
11
- - (void)polylineViewDidUpdate:(LuggMapsPolylineView *)polylineView;
11
+ - (void)polylineViewDidUpdate:(LuggPolylineView *)polylineView;
12
12
  @end
13
13
 
14
- @interface LuggMapsPolylineView : RCTViewComponentView
14
+ @interface LuggPolylineView : RCTViewComponentView
15
15
 
16
16
  @property(nonatomic, readonly) NSArray<CLLocation *> *coordinates;
17
17
  @property(nonatomic, readonly) NSArray<UIColor *> *strokeColors;
18
18
  @property(nonatomic, readonly) BOOL animated;
19
19
  @property(nonatomic, readonly) CGFloat strokeWidth;
20
- @property(nonatomic, weak, nullable) id<LuggMapsPolylineViewDelegate> delegate;
20
+ @property(nonatomic, weak, nullable) id<LuggPolylineViewDelegate> delegate;
21
21
  @property(nonatomic, strong, nullable) NSObject *polyline;
22
22
  @property(nonatomic, weak, nullable) NSObject *renderer;
23
23
  @property(nonatomic, strong, nullable) NSArray *cachedSpans;
@@ -1,4 +1,4 @@
1
- #import "LuggMapsPolylineView.h"
1
+ #import "LuggPolylineView.h"
2
2
 
3
3
  #import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
4
4
  #import <react/renderer/components/RNMapsSpec/EventEmitters.h>
@@ -10,10 +10,10 @@
10
10
 
11
11
  using namespace facebook::react;
12
12
 
13
- @interface LuggMapsPolylineView () <RCTLuggMapsPolylineViewViewProtocol>
13
+ @interface LuggPolylineView () <RCTLuggPolylineViewViewProtocol>
14
14
  @end
15
15
 
16
- @implementation LuggMapsPolylineView {
16
+ @implementation LuggPolylineView {
17
17
  NSArray<CLLocation *> *_coordinates;
18
18
  NSArray<UIColor *> *_strokeColors;
19
19
  BOOL _animated;
@@ -22,13 +22,13 @@ using namespace facebook::react;
22
22
 
23
23
  + (ComponentDescriptorProvider)componentDescriptorProvider {
24
24
  return concreteComponentDescriptorProvider<
25
- LuggMapsPolylineViewComponentDescriptor>();
25
+ LuggPolylineViewComponentDescriptor>();
26
26
  }
27
27
 
28
28
  - (instancetype)initWithFrame:(CGRect)frame {
29
29
  if (self = [super initWithFrame:frame]) {
30
30
  static const auto defaultProps =
31
- std::make_shared<const LuggMapsPolylineViewProps>();
31
+ std::make_shared<const LuggPolylineViewProps>();
32
32
  _props = defaultProps;
33
33
 
34
34
  _coordinates = @[];
@@ -45,7 +45,7 @@ using namespace facebook::react;
45
45
  oldProps:(Props::Shared const &)oldProps {
46
46
  [super updateProps:props oldProps:oldProps];
47
47
  const auto &newViewProps =
48
- *std::static_pointer_cast<LuggMapsPolylineViewProps const>(props);
48
+ *std::static_pointer_cast<LuggPolylineViewProps const>(props);
49
49
 
50
50
  NSMutableArray<CLLocation *> *coords = [NSMutableArray array];
51
51
  for (const auto &coord : newViewProps.coordinates) {
@@ -109,8 +109,8 @@ using namespace facebook::react;
109
109
  self.delegate = nil;
110
110
  }
111
111
 
112
- Class<RCTComponentViewProtocol> LuggMapsPolylineViewCls(void) {
113
- return LuggMapsPolylineView.class;
112
+ Class<RCTComponentViewProtocol> LuggPolylineViewCls(void) {
113
+ return LuggPolylineView.class;
114
114
  }
115
115
 
116
116
  @end
@@ -9,13 +9,18 @@ struct CameraIdleEvent {
9
9
  double latitude;
10
10
  double longitude;
11
11
  double zoom;
12
+ bool gesture;
12
13
 
13
14
  template <typename Emitter>
14
- void emit(std::shared_ptr<Emitter const> emitter) const {
15
+ void emit(const facebook::react::SharedEventEmitter &eventEmitter) const {
16
+ if (!eventEmitter)
17
+ return;
18
+ auto emitter = std::static_pointer_cast<Emitter const>(eventEmitter);
15
19
  typename Emitter::OnCameraIdle event;
16
20
  event.coordinate.latitude = latitude;
17
21
  event.coordinate.longitude = longitude;
18
22
  event.zoom = zoom;
23
+ event.gesture = gesture;
19
24
  emitter->onCameraIdle(event);
20
25
  }
21
26
  };
@@ -9,15 +9,18 @@ struct CameraMoveEvent {
9
9
  double latitude;
10
10
  double longitude;
11
11
  double zoom;
12
- bool dragging;
12
+ bool gesture;
13
13
 
14
14
  template <typename Emitter>
15
- void emit(std::shared_ptr<Emitter const> emitter) const {
15
+ void emit(const facebook::react::SharedEventEmitter &eventEmitter) const {
16
+ if (!eventEmitter)
17
+ return;
18
+ auto emitter = std::static_pointer_cast<Emitter const>(eventEmitter);
16
19
  typename Emitter::OnCameraMove event;
17
20
  event.coordinate.latitude = latitude;
18
21
  event.coordinate.longitude = longitude;
19
22
  event.zoom = zoom;
20
- event.dragging = dragging;
23
+ event.gesture = gesture;
21
24
  emitter->onCameraMove(event);
22
25
  }
23
26
  };
@@ -0,0 +1,20 @@
1
+ #pragma once
2
+
3
+ #import <react/renderer/components/RNMapsSpec/EventEmitters.h>
4
+
5
+ namespace luggmaps {
6
+ namespace events {
7
+
8
+ struct ReadyEvent {
9
+ template <typename Emitter>
10
+ static void emit(const facebook::react::SharedEventEmitter &eventEmitter) {
11
+ if (!eventEmitter)
12
+ return;
13
+ auto emitter = std::static_pointer_cast<Emitter const>(eventEmitter);
14
+ typename Emitter::OnReady event;
15
+ emitter->onReady(event);
16
+ }
17
+ };
18
+
19
+ } // namespace events
20
+ } // namespace luggmaps
@@ -2,9 +2,9 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { Platform, StyleSheet } from 'react-native';
5
- import LuggMapsGoogleMapViewNativeComponent, { Commands as GoogleMapCommands } from './fabric/LuggMapsGoogleMapViewNativeComponent';
6
- import LuggMapsAppleMapViewNativeComponent, { Commands as AppleMapCommands } from './fabric/LuggMapsAppleMapViewNativeComponent';
7
- import LuggMapsWrapperViewNativeComponent from './fabric/LuggMapsWrapperViewNativeComponent';
5
+ import LuggGoogleMapViewNativeComponent, { Commands as GoogleMapCommands } from './fabric/LuggGoogleMapViewNativeComponent';
6
+ import LuggAppleMapViewNativeComponent, { Commands as AppleMapCommands } from './fabric/LuggAppleMapViewNativeComponent';
7
+ import LuggMapWrapperViewNativeComponent from './fabric/LuggMapWrapperViewNativeComponent';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  export class MapView extends React.Component {
10
10
  static defaultProps = {
@@ -54,31 +54,39 @@ export class MapView extends React.Component {
54
54
  mapId,
55
55
  initialCoordinate,
56
56
  initialZoom,
57
+ minZoom,
58
+ maxZoom,
57
59
  zoomEnabled,
58
60
  scrollEnabled,
59
61
  rotateEnabled,
60
62
  pitchEnabled,
61
63
  padding,
64
+ userLocationEnabled,
62
65
  onCameraMove,
63
66
  onCameraIdle,
67
+ onReady,
64
68
  children,
65
69
  ...rest
66
70
  } = this.props;
67
- const NativeMapView = Platform.OS === 'ios' && provider === 'apple' ? LuggMapsAppleMapViewNativeComponent : LuggMapsGoogleMapViewNativeComponent;
71
+ const NativeMapView = Platform.OS === 'ios' && provider === 'apple' ? LuggAppleMapViewNativeComponent : LuggGoogleMapViewNativeComponent;
68
72
  return /*#__PURE__*/_jsxs(NativeMapView, {
69
73
  ref: this.nativeRef,
70
74
  ...rest,
71
75
  mapId: mapId,
72
76
  initialCoordinate: initialCoordinate,
73
77
  initialZoom: initialZoom,
78
+ minZoom: minZoom,
79
+ maxZoom: maxZoom,
74
80
  zoomEnabled: zoomEnabled,
75
81
  scrollEnabled: scrollEnabled,
76
82
  rotateEnabled: rotateEnabled,
77
83
  pitchEnabled: pitchEnabled,
78
84
  padding: padding,
85
+ userLocationEnabled: userLocationEnabled,
79
86
  onCameraMove: onCameraMove,
80
87
  onCameraIdle: onCameraIdle,
81
- children: [/*#__PURE__*/_jsx(LuggMapsWrapperViewNativeComponent, {
88
+ onReady: onReady,
89
+ children: [/*#__PURE__*/_jsx(LuggMapWrapperViewNativeComponent, {
82
90
  style: StyleSheet.absoluteFill
83
91
  }), children]
84
92
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","StyleSheet","LuggMapsGoogleMapViewNativeComponent","Commands","GoogleMapCommands","LuggMapsAppleMapViewNativeComponent","AppleMapCommands","LuggMapsWrapperViewNativeComponent","jsx","_jsx","jsxs","_jsxs","MapView","Component","defaultProps","provider","OS","initialZoom","zoomEnabled","scrollEnabled","rotateEnabled","pitchEnabled","nativeRef","createRef","nativeCommands","props","isApple","moveCamera","coordinate","options","ref","current","zoom","duration","latitude","longitude","fitCoordinates","coordinates","first","padding","length","render","mapId","initialCoordinate","onCameraMove","onCameraIdle","children","rest","NativeMapView","style","absoluteFill"],"sourceRoot":"../../src","sources":["MapView.tsx"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","StyleSheet","LuggGoogleMapViewNativeComponent","Commands","GoogleMapCommands","LuggAppleMapViewNativeComponent","AppleMapCommands","LuggMapWrapperViewNativeComponent","jsx","_jsx","jsxs","_jsxs","MapView","Component","defaultProps","provider","OS","initialZoom","zoomEnabled","scrollEnabled","rotateEnabled","pitchEnabled","nativeRef","createRef","nativeCommands","props","isApple","moveCamera","coordinate","options","ref","current","zoom","duration","latitude","longitude","fitCoordinates","coordinates","first","padding","length","render","mapId","initialCoordinate","minZoom","maxZoom","userLocationEnabled","onCameraMove","onCameraIdle","onReady","children","rest","NativeMapView","style","absoluteFill"],"sourceRoot":"../../src","sources":["MapView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,OAAOC,gCAAgC,IACrCC,QAAQ,IAAIC,iBAAiB,QACxB,2CAA2C;AAClD,OAAOC,+BAA+B,IACpCF,QAAQ,IAAIG,gBAAgB,QACvB,0CAA0C;AACjD,OAAOC,iCAAiC,MAAM,4CAA4C;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS3F,OAAO,MAAMC,OAAO,SACVb,KAAK,CAACc,SAAS,CAEzB;EACE,OAAOC,YAAY,GAA0B;IAC3CC,QAAQ,EAAEf,QAAQ,CAACgB,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,QAAQ;IACpDC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE,IAAI;IACjBC,aAAa,EAAE,IAAI;IACnBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EAEOC,SAAS,gBAAGvB,KAAK,CAACwB,SAAS,CAAM,CAAC;EAE1C,IAAYC,cAAcA,CAAA,EAAG;IAC3B,MAAMT,QAAQ,GAAG,IAAI,CAACU,KAAK,CAACV,QAAQ,IAAIH,OAAO,CAACE,YAAY,CAACC,QAAQ;IACrE,MAAMW,OAAO,GAAG1B,QAAQ,CAACgB,EAAE,KAAK,KAAK,IAAID,QAAQ,KAAK,OAAO;IAC7D,OAAOW,OAAO,GAAGpB,gBAAgB,GAAGF,iBAAiB;EACvD;EAEAuB,UAAUA,CAACC,UAAsB,EAAEC,OAA0B,EAAE;IAC7D,MAAMC,GAAG,GAAG,IAAI,CAACR,SAAS,CAACS,OAAO;IAClC,IAAI,CAACD,GAAG,EAAE;IAEV,MAAM;MAAEE,IAAI;MAAEC,QAAQ,GAAG,CAAC;IAAE,CAAC,GAAGJ,OAAO;IACvC,IAAI,CAACL,cAAc,CAACG,UAAU,CAC5BG,GAAG,EACHF,UAAU,CAACM,QAAQ,EACnBN,UAAU,CAACO,SAAS,EACpBH,IAAI,EACJC,QACF,CAAC;EACH;EAEAG,cAAcA,CAACC,WAAyB,EAAER,OAA+B,EAAE;IACzE,MAAMC,GAAG,GAAG,IAAI,CAACR,SAAS,CAACS,OAAO;IAClC,MAAMO,KAAK,GAAGD,WAAW,CAAC,CAAC,CAAC;IAC5B,IAAI,CAACP,GAAG,IAAI,CAACQ,KAAK,EAAE;IAEpB,MAAM;MAAEC,OAAO,GAAG,CAAC;MAAEN,QAAQ,GAAG,CAAC;IAAE,CAAC,GAAGJ,OAAO,IAAI,CAAC,CAAC;IAEpD,IAAIQ,WAAW,CAACG,MAAM,KAAK,CAAC,EAAE;MAC5B,MAAMR,IAAI,GAAG,IAAI,CAACP,KAAK,CAACR,WAAW,IAAI,EAAE;MACzC,IAAI,CAACU,UAAU,CAACW,KAAK,EAAE;QAAEN,IAAI;QAAEC;MAAS,CAAC,CAAC;MAC1C;IACF;IAEA,IAAI,CAACT,cAAc,CAACY,cAAc,CAACN,GAAG,EAAEO,WAAW,EAAEE,OAAO,EAAEN,QAAQ,CAAC;EACzE;EAEAQ,MAAMA,CAAA,EAAG;IACP,MAAM;MACJ1B,QAAQ;MACR2B,KAAK;MACLC,iBAAiB;MACjB1B,WAAW;MACX2B,OAAO;MACPC,OAAO;MACP3B,WAAW;MACXC,aAAa;MACbC,aAAa;MACbC,YAAY;MACZkB,OAAO;MACPO,mBAAmB;MACnBC,YAAY;MACZC,YAAY;MACZC,OAAO;MACPC,QAAQ;MACR,GAAGC;IACL,CAAC,GAAG,IAAI,CAAC1B,KAAK;IAEd,MAAM2B,aAAa,GACjBpD,QAAQ,CAACgB,EAAE,KAAK,KAAK,IAAID,QAAQ,KAAK,OAAO,GACzCV,+BAA+B,GAC/BH,gCAAgC;IAEtC,oBACES,KAAA,CAACyC,aAAa;MACZtB,GAAG,EAAE,IAAI,CAACR,SAAU;MAAA,GAChB6B,IAAI;MACRT,KAAK,EAAEA,KAAM;MACbC,iBAAiB,EAAEA,iBAAkB;MACrC1B,WAAW,EAAEA,WAAY;MACzB2B,OAAO,EAAEA,OAAQ;MACjBC,OAAO,EAAEA,OAAQ;MACjB3B,WAAW,EAAEA,WAAY;MACzBC,aAAa,EAAEA,aAAc;MAC7BC,aAAa,EAAEA,aAAc;MAC7BC,YAAY,EAAEA,YAAa;MAC3BkB,OAAO,EAAEA,OAAQ;MACjBO,mBAAmB,EAAEA,mBAAoB;MACzCC,YAAY,EAAEA,YAAa;MAC3BC,YAAY,EAAEA,YAAa;MAC3BC,OAAO,EAAEA,OAAQ;MAAAC,QAAA,gBAEjBzC,IAAA,CAACF,iCAAiC;QAAC8C,KAAK,EAAEpD,UAAU,CAACqD;MAAa,CAAE,CAAC,EACpEJ,QAAQ;IAAA,CACI,CAAC;EAEpB;AACF","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import React from 'react';
4
- import LuggMapsMarkerViewNativeComponent from './fabric/LuggMapsMarkerViewNativeComponent';
5
4
  import { StyleSheet } from 'react-native';
5
+ import LuggMarkerViewNativeComponent from '../fabric/LuggMarkerViewNativeComponent';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export class Marker extends React.Component {
8
8
  render() {
@@ -14,7 +14,7 @@ export class Marker extends React.Component {
14
14
  anchor,
15
15
  children
16
16
  } = this.props;
17
- return /*#__PURE__*/_jsx(LuggMapsMarkerViewNativeComponent, {
17
+ return /*#__PURE__*/_jsx(LuggMarkerViewNativeComponent, {
18
18
  style: styles.marker,
19
19
  name: name,
20
20
  coordinate: coordinate,
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","LuggMarkerViewNativeComponent","jsx","_jsx","Marker","Component","render","name","coordinate","title","description","anchor","children","props","style","styles","marker","create","position","pointerEvents"],"sourceRoot":"../../../src","sources":["components/Marker.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,6BAA6B,MAAM,yCAAyC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA8BpF,OAAO,MAAMC,MAAM,SAASL,KAAK,CAACM,SAAS,CAAc;EACvDC,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEC,IAAI;MAAEC,UAAU;MAAEC,KAAK;MAAEC,WAAW;MAAEC,MAAM;MAAEC;IAAS,CAAC,GAC9D,IAAI,CAACC,KAAK;IAEZ,oBACEV,IAAA,CAACF,6BAA6B;MAC5Ba,KAAK,EAAEC,MAAM,CAACC,MAAO;MACrBT,IAAI,EAAEA,IAAK;MACXC,UAAU,EAAEA,UAAW;MACvBC,KAAK,EAAEA,KAAM;MACbC,WAAW,EAAEA,WAAY;MACzBC,MAAM,EAAEA,MAAO;MAAAC,QAAA,EAEdA;IAAQ,CACoB,CAAC;EAEpC;AACF;AAEA,MAAMG,MAAM,GAAGf,UAAU,CAACiB,MAAM,CAAC;EAC/BD,MAAM,EAAE;IACNE,QAAQ,EAAE,UAAU;IACpBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}