@lugg/maps 1.0.0-beta.2 → 1.0.0-beta.4
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/README.md +3 -0
- package/android/src/main/java/com/luggmaps/LuggCircleView.kt +85 -0
- package/android/src/main/java/com/luggmaps/LuggCircleViewManager.kt +79 -0
- package/android/src/main/java/com/luggmaps/LuggGroundOverlayView.kt +81 -0
- package/android/src/main/java/com/luggmaps/LuggGroundOverlayViewManager.kt +82 -0
- package/android/src/main/java/com/luggmaps/LuggMapView.kt +9 -0
- package/android/src/main/java/com/luggmaps/LuggPackage.kt +4 -1
- package/android/src/main/java/com/luggmaps/LuggTileOverlayView.kt +92 -0
- package/android/src/main/java/com/luggmaps/LuggTileOverlayViewManager.kt +80 -0
- package/android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt +290 -1
- package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +9 -0
- package/android/src/main/java/com/luggmaps/events/CirclePressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/GroundOverlayPressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/TileOverlayPressEvent.kt +12 -0
- package/ios/LuggCircleView.h +31 -0
- package/ios/LuggCircleView.mm +133 -0
- package/ios/LuggGroundOverlayView.h +30 -0
- package/ios/LuggGroundOverlayView.mm +125 -0
- package/ios/LuggMapView.mm +43 -0
- package/ios/LuggTileOverlayView.h +31 -0
- package/ios/LuggTileOverlayView.mm +130 -0
- package/ios/core/AppleMapProvider.mm +402 -7
- package/ios/core/GoogleMapProvider.mm +305 -11
- package/ios/core/MapProviderDelegate.h +12 -0
- package/ios/events/CirclePressEvent.h +20 -0
- package/ios/events/GroundOverlayPressEvent.h +20 -0
- package/ios/events/TileOverlayPressEvent.h +20 -0
- package/lib/module/components/Circle.js +46 -0
- package/lib/module/components/Circle.js.map +1 -0
- package/lib/module/components/Circle.types.js +4 -0
- package/lib/module/components/Circle.types.js.map +1 -0
- package/lib/module/components/Circle.web.js +79 -0
- package/lib/module/components/Circle.web.js.map +1 -0
- package/lib/module/components/GroundOverlay.js +45 -0
- package/lib/module/components/GroundOverlay.js.map +1 -0
- package/lib/module/components/GroundOverlay.types.js +4 -0
- package/lib/module/components/GroundOverlay.types.js.map +1 -0
- package/lib/module/components/GroundOverlay.web.js +77 -0
- package/lib/module/components/GroundOverlay.web.js.map +1 -0
- package/lib/module/components/Marker.js +5 -1
- package/lib/module/components/Marker.js.map +1 -1
- package/lib/module/components/TileOverlay.js +44 -0
- package/lib/module/components/TileOverlay.js.map +1 -0
- package/lib/module/components/TileOverlay.types.js +4 -0
- package/lib/module/components/TileOverlay.types.js.map +1 -0
- package/lib/module/components/TileOverlay.web.js +69 -0
- package/lib/module/components/TileOverlay.web.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/index.web.js +3 -0
- package/lib/module/components/index.web.js.map +1 -1
- package/lib/module/fabric/LuggCircleViewNativeComponent.ts +25 -0
- package/lib/module/fabric/LuggGroundOverlayViewNativeComponent.ts +29 -0
- package/lib/module/fabric/LuggTileOverlayViewNativeComponent.ts +30 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +3 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/src/components/Circle.d.ts +10 -0
- package/lib/typescript/src/components/Circle.d.ts.map +1 -0
- package/lib/typescript/src/components/Circle.types.d.ts +33 -0
- package/lib/typescript/src/components/Circle.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Circle.web.d.ts +3 -0
- package/lib/typescript/src/components/Circle.web.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.d.ts +10 -0
- package/lib/typescript/src/components/GroundOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.types.d.ts +35 -0
- package/lib/typescript/src/components/GroundOverlay.types.d.ts.map +1 -0
- package/lib/typescript/src/components/GroundOverlay.web.d.ts +3 -0
- package/lib/typescript/src/components/GroundOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.types.d.ts +4 -1
- package/lib/typescript/src/components/Marker.types.d.ts.map +1 -1
- package/lib/typescript/src/components/TileOverlay.d.ts +10 -0
- package/lib/typescript/src/components/TileOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/TileOverlay.types.d.ts +36 -0
- package/lib/typescript/src/components/TileOverlay.types.d.ts.map +1 -0
- package/lib/typescript/src/components/TileOverlay.web.d.ts +3 -0
- package/lib/typescript/src/components/TileOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +6 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.web.d.ts +6 -0
- package/lib/typescript/src/components/index.web.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggCircleViewNativeComponent.d.ts +18 -0
- package/lib/typescript/src/fabric/LuggCircleViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggGroundOverlayViewNativeComponent.d.ts +21 -0
- package/lib/typescript/src/fabric/LuggGroundOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggTileOverlayViewNativeComponent.d.ts +21 -0
- package/lib/typescript/src/fabric/LuggTileOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +6 -0
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/components/Circle.tsx +52 -0
- package/src/components/Circle.types.ts +33 -0
- package/src/components/Circle.web.tsx +93 -0
- package/src/components/GroundOverlay.tsx +47 -0
- package/src/components/GroundOverlay.types.ts +36 -0
- package/src/components/GroundOverlay.web.tsx +85 -0
- package/src/components/Marker.tsx +4 -1
- package/src/components/Marker.types.ts +4 -1
- package/src/components/TileOverlay.tsx +44 -0
- package/src/components/TileOverlay.types.ts +37 -0
- package/src/components/TileOverlay.web.tsx +95 -0
- package/src/components/index.ts +9 -0
- package/src/components/index.web.ts +9 -0
- package/src/fabric/LuggCircleViewNativeComponent.ts +25 -0
- package/src/fabric/LuggGroundOverlayViewNativeComponent.ts +29 -0
- package/src/fabric/LuggTileOverlayViewNativeComponent.ts +30 -0
- package/src/index.ts +6 -0
- package/src/index.web.ts +12 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#import "LuggGroundOverlayView.h"
|
|
2
|
+
#import "events/GroundOverlayPressEvent.h"
|
|
3
|
+
|
|
4
|
+
#import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
|
|
5
|
+
#import <react/renderer/components/RNMapsSpec/EventEmitters.h>
|
|
6
|
+
#import <react/renderer/components/RNMapsSpec/Props.h>
|
|
7
|
+
#import <react/renderer/components/RNMapsSpec/RCTComponentViewHelpers.h>
|
|
8
|
+
|
|
9
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
10
|
+
|
|
11
|
+
using namespace facebook::react;
|
|
12
|
+
using namespace luggmaps::events;
|
|
13
|
+
|
|
14
|
+
@interface LuggGroundOverlayView () <RCTLuggGroundOverlayViewViewProtocol>
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
@implementation LuggGroundOverlayView {
|
|
18
|
+
NSString *_imageUri;
|
|
19
|
+
CLLocationCoordinate2D _northeast;
|
|
20
|
+
CLLocationCoordinate2D _southwest;
|
|
21
|
+
CGFloat _opacity;
|
|
22
|
+
CGFloat _bearing;
|
|
23
|
+
NSInteger _zIndex;
|
|
24
|
+
BOOL _tappable;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
28
|
+
return concreteComponentDescriptorProvider<
|
|
29
|
+
LuggGroundOverlayViewComponentDescriptor>();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
33
|
+
if (self = [super initWithFrame:frame]) {
|
|
34
|
+
static const auto defaultProps =
|
|
35
|
+
std::make_shared<const LuggGroundOverlayViewProps>();
|
|
36
|
+
_props = defaultProps;
|
|
37
|
+
|
|
38
|
+
_imageUri = @"";
|
|
39
|
+
_northeast = CLLocationCoordinate2DMake(0, 0);
|
|
40
|
+
_southwest = CLLocationCoordinate2DMake(0, 0);
|
|
41
|
+
_opacity = 1.0;
|
|
42
|
+
_bearing = 0.0;
|
|
43
|
+
|
|
44
|
+
self.hidden = YES;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return self;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
- (void)updateProps:(Props::Shared const &)props
|
|
51
|
+
oldProps:(Props::Shared const &)oldProps {
|
|
52
|
+
[super updateProps:props oldProps:oldProps];
|
|
53
|
+
const auto &newViewProps =
|
|
54
|
+
*std::static_pointer_cast<LuggGroundOverlayViewProps const>(props);
|
|
55
|
+
|
|
56
|
+
_imageUri = [NSString stringWithUTF8String:newViewProps.image.c_str()];
|
|
57
|
+
|
|
58
|
+
_northeast =
|
|
59
|
+
CLLocationCoordinate2DMake(newViewProps.bounds.northeast.latitude,
|
|
60
|
+
newViewProps.bounds.northeast.longitude);
|
|
61
|
+
_southwest =
|
|
62
|
+
CLLocationCoordinate2DMake(newViewProps.bounds.southwest.latitude,
|
|
63
|
+
newViewProps.bounds.southwest.longitude);
|
|
64
|
+
|
|
65
|
+
_opacity = newViewProps.opacity;
|
|
66
|
+
_bearing = newViewProps.bearing;
|
|
67
|
+
_zIndex = newViewProps.zIndex.value_or(0);
|
|
68
|
+
_tappable = newViewProps.tappable;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
|
|
72
|
+
[super finalizeUpdates:updateMask];
|
|
73
|
+
|
|
74
|
+
if (updateMask & RNComponentViewUpdateMaskProps) {
|
|
75
|
+
if ([self.delegate
|
|
76
|
+
respondsToSelector:@selector(groundOverlayViewDidUpdate:)]) {
|
|
77
|
+
[self.delegate groundOverlayViewDidUpdate:self];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
- (NSString *)imageUri {
|
|
83
|
+
return _imageUri;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
- (CLLocationCoordinate2D)northeast {
|
|
87
|
+
return _northeast;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
- (CLLocationCoordinate2D)southwest {
|
|
91
|
+
return _southwest;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
- (CGFloat)opacity {
|
|
95
|
+
return _opacity;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
- (CGFloat)bearing {
|
|
99
|
+
return _bearing;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
- (NSInteger)zIndex {
|
|
103
|
+
return _zIndex;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
- (BOOL)tappable {
|
|
107
|
+
return _tappable;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
- (void)emitPressEvent {
|
|
111
|
+
GroundOverlayPressEvent::emit<LuggGroundOverlayViewEventEmitter>(
|
|
112
|
+
_eventEmitter);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
- (void)prepareForRecycle {
|
|
116
|
+
[super prepareForRecycle];
|
|
117
|
+
self.overlay = nil;
|
|
118
|
+
self.delegate = nil;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
Class<RCTComponentViewProtocol> LuggGroundOverlayViewCls(void) {
|
|
122
|
+
return LuggGroundOverlayView.class;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@end
|
package/ios/LuggMapView.mm
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#import "LuggMapView.h"
|
|
2
|
+
#import "LuggCircleView.h"
|
|
3
|
+
#import "LuggGroundOverlayView.h"
|
|
2
4
|
#import "LuggMapWrapperView.h"
|
|
3
5
|
#import "LuggMarkerView.h"
|
|
4
6
|
#import "LuggPolygonView.h"
|
|
5
7
|
#import "LuggPolylineView.h"
|
|
8
|
+
#import "LuggTileOverlayView.h"
|
|
6
9
|
#import "core/AppleMapProvider.h"
|
|
7
10
|
#import "core/GoogleMapProvider.h"
|
|
8
11
|
#import "core/MapProviderDelegate.h"
|
|
@@ -91,6 +94,23 @@ using namespace luggmaps::events;
|
|
|
91
94
|
if (_provider) {
|
|
92
95
|
[_provider addPolygonView:polygonView];
|
|
93
96
|
}
|
|
97
|
+
} else if ([childComponentView isKindOfClass:[LuggCircleView class]]) {
|
|
98
|
+
LuggCircleView *circleView = (LuggCircleView *)childComponentView;
|
|
99
|
+
if (_provider) {
|
|
100
|
+
[_provider addCircleView:circleView];
|
|
101
|
+
}
|
|
102
|
+
} else if ([childComponentView isKindOfClass:[LuggGroundOverlayView class]]) {
|
|
103
|
+
LuggGroundOverlayView *groundOverlayView =
|
|
104
|
+
(LuggGroundOverlayView *)childComponentView;
|
|
105
|
+
if (_provider) {
|
|
106
|
+
[_provider addGroundOverlayView:groundOverlayView];
|
|
107
|
+
}
|
|
108
|
+
} else if ([childComponentView isKindOfClass:[LuggTileOverlayView class]]) {
|
|
109
|
+
LuggTileOverlayView *tileOverlayView =
|
|
110
|
+
(LuggTileOverlayView *)childComponentView;
|
|
111
|
+
if (_provider) {
|
|
112
|
+
[_provider addTileOverlayView:tileOverlayView];
|
|
113
|
+
}
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
116
|
|
|
@@ -112,6 +132,23 @@ using namespace luggmaps::events;
|
|
|
112
132
|
if (_provider) {
|
|
113
133
|
[_provider removePolygonView:polygonView];
|
|
114
134
|
}
|
|
135
|
+
} else if ([childComponentView isKindOfClass:[LuggCircleView class]]) {
|
|
136
|
+
LuggCircleView *circleView = (LuggCircleView *)childComponentView;
|
|
137
|
+
if (_provider) {
|
|
138
|
+
[_provider removeCircleView:circleView];
|
|
139
|
+
}
|
|
140
|
+
} else if ([childComponentView isKindOfClass:[LuggGroundOverlayView class]]) {
|
|
141
|
+
LuggGroundOverlayView *groundOverlayView =
|
|
142
|
+
(LuggGroundOverlayView *)childComponentView;
|
|
143
|
+
if (_provider) {
|
|
144
|
+
[_provider removeGroundOverlayView:groundOverlayView];
|
|
145
|
+
}
|
|
146
|
+
} else if ([childComponentView isKindOfClass:[LuggTileOverlayView class]]) {
|
|
147
|
+
LuggTileOverlayView *tileOverlayView =
|
|
148
|
+
(LuggTileOverlayView *)childComponentView;
|
|
149
|
+
if (_provider) {
|
|
150
|
+
[_provider removeTileOverlayView:tileOverlayView];
|
|
151
|
+
}
|
|
115
152
|
}
|
|
116
153
|
|
|
117
154
|
[super unmountChildComponentView:childComponentView index:index];
|
|
@@ -179,6 +216,12 @@ using namespace luggmaps::events;
|
|
|
179
216
|
[_provider addPolylineView:(LuggPolylineView *)subview];
|
|
180
217
|
} else if ([subview isKindOfClass:[LuggPolygonView class]]) {
|
|
181
218
|
[_provider addPolygonView:(LuggPolygonView *)subview];
|
|
219
|
+
} else if ([subview isKindOfClass:[LuggCircleView class]]) {
|
|
220
|
+
[_provider addCircleView:(LuggCircleView *)subview];
|
|
221
|
+
} else if ([subview isKindOfClass:[LuggGroundOverlayView class]]) {
|
|
222
|
+
[_provider addGroundOverlayView:(LuggGroundOverlayView *)subview];
|
|
223
|
+
} else if ([subview isKindOfClass:[LuggTileOverlayView class]]) {
|
|
224
|
+
[_provider addTileOverlayView:(LuggTileOverlayView *)subview];
|
|
182
225
|
}
|
|
183
226
|
}
|
|
184
227
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#import <CoreLocation/CoreLocation.h>
|
|
2
|
+
#import <React/RCTViewComponentView.h>
|
|
3
|
+
#import <UIKit/UIKit.h>
|
|
4
|
+
|
|
5
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
6
|
+
|
|
7
|
+
@class LuggTileOverlayView;
|
|
8
|
+
|
|
9
|
+
@protocol LuggTileOverlayViewDelegate <NSObject>
|
|
10
|
+
@optional
|
|
11
|
+
- (void)tileOverlayViewDidUpdate:(LuggTileOverlayView *)tileOverlayView;
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
@interface LuggTileOverlayView : RCTViewComponentView
|
|
15
|
+
|
|
16
|
+
@property(nonatomic, readonly) NSString *urlTemplate;
|
|
17
|
+
@property(nonatomic, readonly) NSInteger tileSize;
|
|
18
|
+
@property(nonatomic, readonly) CGFloat opacity;
|
|
19
|
+
@property(nonatomic, readonly) BOOL hasBounds;
|
|
20
|
+
@property(nonatomic, readonly) CLLocationCoordinate2D northeast;
|
|
21
|
+
@property(nonatomic, readonly) CLLocationCoordinate2D southwest;
|
|
22
|
+
@property(nonatomic, readonly) NSInteger zIndex;
|
|
23
|
+
@property(nonatomic, readonly) BOOL tappable;
|
|
24
|
+
@property(nonatomic, weak, nullable) id<LuggTileOverlayViewDelegate> delegate;
|
|
25
|
+
@property(nonatomic, strong, nullable) NSObject *overlay;
|
|
26
|
+
|
|
27
|
+
- (void)emitPressEvent;
|
|
28
|
+
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#import "LuggTileOverlayView.h"
|
|
2
|
+
#import "events/TileOverlayPressEvent.h"
|
|
3
|
+
|
|
4
|
+
#import <react/renderer/components/RNMapsSpec/ComponentDescriptors.h>
|
|
5
|
+
#import <react/renderer/components/RNMapsSpec/EventEmitters.h>
|
|
6
|
+
#import <react/renderer/components/RNMapsSpec/Props.h>
|
|
7
|
+
#import <react/renderer/components/RNMapsSpec/RCTComponentViewHelpers.h>
|
|
8
|
+
|
|
9
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
10
|
+
|
|
11
|
+
using namespace facebook::react;
|
|
12
|
+
using namespace luggmaps::events;
|
|
13
|
+
|
|
14
|
+
@interface LuggTileOverlayView () <RCTLuggTileOverlayViewViewProtocol>
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
@implementation LuggTileOverlayView {
|
|
18
|
+
NSString *_urlTemplate;
|
|
19
|
+
NSInteger _tileSize;
|
|
20
|
+
CGFloat _opacity;
|
|
21
|
+
BOOL _hasBounds;
|
|
22
|
+
CLLocationCoordinate2D _northeast;
|
|
23
|
+
CLLocationCoordinate2D _southwest;
|
|
24
|
+
NSInteger _zIndex;
|
|
25
|
+
BOOL _tappable;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
29
|
+
return concreteComponentDescriptorProvider<
|
|
30
|
+
LuggTileOverlayViewComponentDescriptor>();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
34
|
+
if (self = [super initWithFrame:frame]) {
|
|
35
|
+
static const auto defaultProps =
|
|
36
|
+
std::make_shared<const LuggTileOverlayViewProps>();
|
|
37
|
+
_props = defaultProps;
|
|
38
|
+
|
|
39
|
+
_urlTemplate = @"";
|
|
40
|
+
_tileSize = 256;
|
|
41
|
+
_opacity = 1.0;
|
|
42
|
+
|
|
43
|
+
self.hidden = YES;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return self;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
- (void)updateProps:(Props::Shared const &)props
|
|
50
|
+
oldProps:(Props::Shared const &)oldProps {
|
|
51
|
+
[super updateProps:props oldProps:oldProps];
|
|
52
|
+
const auto &newViewProps =
|
|
53
|
+
*std::static_pointer_cast<LuggTileOverlayViewProps const>(props);
|
|
54
|
+
|
|
55
|
+
_urlTemplate =
|
|
56
|
+
[NSString stringWithUTF8String:newViewProps.urlTemplate.c_str()];
|
|
57
|
+
_tileSize = newViewProps.tileSize;
|
|
58
|
+
_opacity = newViewProps.opacity;
|
|
59
|
+
|
|
60
|
+
auto ne = newViewProps.bounds.northeast;
|
|
61
|
+
auto sw = newViewProps.bounds.southwest;
|
|
62
|
+
_hasBounds = (ne.latitude != 0 || ne.longitude != 0 || sw.latitude != 0 ||
|
|
63
|
+
sw.longitude != 0);
|
|
64
|
+
if (_hasBounds) {
|
|
65
|
+
_northeast = CLLocationCoordinate2DMake(ne.latitude, ne.longitude);
|
|
66
|
+
_southwest = CLLocationCoordinate2DMake(sw.latitude, sw.longitude);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
_zIndex = newViewProps.zIndex.value_or(0);
|
|
70
|
+
_tappable = newViewProps.tappable;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
|
|
74
|
+
[super finalizeUpdates:updateMask];
|
|
75
|
+
|
|
76
|
+
if (updateMask & RNComponentViewUpdateMaskProps) {
|
|
77
|
+
if ([self.delegate
|
|
78
|
+
respondsToSelector:@selector(tileOverlayViewDidUpdate:)]) {
|
|
79
|
+
[self.delegate tileOverlayViewDidUpdate:self];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
- (NSString *)urlTemplate {
|
|
85
|
+
return _urlTemplate;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
- (NSInteger)tileSize {
|
|
89
|
+
return _tileSize;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
- (CGFloat)opacity {
|
|
93
|
+
return _opacity;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
- (BOOL)hasBounds {
|
|
97
|
+
return _hasBounds;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
- (CLLocationCoordinate2D)northeast {
|
|
101
|
+
return _northeast;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
- (CLLocationCoordinate2D)southwest {
|
|
105
|
+
return _southwest;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
- (NSInteger)zIndex {
|
|
109
|
+
return _zIndex;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
- (BOOL)tappable {
|
|
113
|
+
return _tappable;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
- (void)emitPressEvent {
|
|
117
|
+
TileOverlayPressEvent::emit<LuggTileOverlayViewEventEmitter>(_eventEmitter);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
- (void)prepareForRecycle {
|
|
121
|
+
[super prepareForRecycle];
|
|
122
|
+
self.overlay = nil;
|
|
123
|
+
self.delegate = nil;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Class<RCTComponentViewProtocol> LuggTileOverlayViewCls(void) {
|
|
127
|
+
return LuggTileOverlayView.class;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@end
|