react-native-map4d-map-dtqg 0.1.0 → 0.1.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.
- package/LICENSE +21 -21
- package/README.md +88 -41
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.0-milestone-1/checksums/checksums.lock +0 -0
- package/android/.gradle/9.0-milestone-1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/9.0-milestone-1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/9.0-milestone-1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.0-milestone-1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/AndroidProjectSystem.xml +6 -0
- package/android/.idea/caches/deviceStreaming.xml +1570 -0
- package/android/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/android/.idea/gradle.xml +12 -0
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +10 -0
- package/android/.idea/runConfigurations.xml +17 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build.gradle +60 -60
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
- package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +226 -226
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
- package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
- package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
- package/ios/Map4dMap.h +7 -7
- package/ios/Map4dMap.m +14 -14
- package/ios/Map4dMapViewManager.m +34 -34
- package/ios/RCTConvert+Map4dMap.h +33 -33
- package/ios/RCTConvert+Map4dMap.m +112 -112
- package/ios/RMFCircle.h +37 -37
- package/ios/RMFCircle.m +100 -100
- package/ios/RMFCircleManager.h +18 -18
- package/ios/RMFCircleManager.m +155 -155
- package/ios/RMFCircleMap4d.h +23 -23
- package/ios/RMFCircleMap4d.m +13 -13
- package/ios/RMFCoordinate.h +22 -22
- package/ios/RMFCoordinate.m +13 -13
- package/ios/RMFDirectionsMarkerOptions.h +24 -24
- package/ios/RMFDirectionsMarkerOptions.m +23 -23
- package/ios/RMFDirectionsRenderer.h +47 -47
- package/ios/RMFDirectionsRenderer.m +182 -182
- package/ios/RMFDirectionsRendererManager.h +17 -17
- package/ios/RMFDirectionsRendererManager.m +84 -84
- package/ios/RMFDirectionsRendererMap4d.h +21 -21
- package/ios/RMFDirectionsRendererMap4d.m +12 -12
- package/ios/RMFDummyView.h +6 -6
- package/ios/RMFDummyView.m +12 -12
- package/ios/RMFEventResponse.h +39 -39
- package/ios/RMFEventResponse.m +98 -98
- package/ios/RMFIcon.h +24 -24
- package/ios/RMFIcon.m +35 -35
- package/ios/RMFMapView.h +84 -84
- package/ios/RMFMapView.m +376 -376
- package/ios/RMFMapViewManager.h +17 -17
- package/ios/RMFMapViewManager.m +493 -493
- package/ios/RMFMarker.h +57 -57
- package/ios/RMFMarker.m +267 -267
- package/ios/RMFMarkerManager.h +17 -17
- package/ios/RMFMarkerManager.m +156 -156
- package/ios/RMFMarkerMap4d.h +19 -19
- package/ios/RMFMarkerMap4d.m +13 -13
- package/ios/RMFPOI.h +38 -38
- package/ios/RMFPOI.m +123 -123
- package/ios/RMFPOIManager.h +18 -18
- package/ios/RMFPOIManager.m +168 -168
- package/ios/RMFPOIMap4d.h +22 -22
- package/ios/RMFPOIMap4d.m +12 -12
- package/ios/RMFPolygon.h +41 -41
- package/ios/RMFPolygon.m +106 -106
- package/ios/RMFPolygonManager.h +18 -18
- package/ios/RMFPolygonManager.m +141 -141
- package/ios/RMFPolygonMap4d.h +23 -23
- package/ios/RMFPolygonMap4d.m +15 -15
- package/ios/RMFPolyline.h +38 -38
- package/ios/RMFPolyline.m +101 -101
- package/ios/RMFPolylineManager.h +18 -18
- package/ios/RMFPolylineManager.m +139 -139
- package/ios/RMFPolylineMap4d.h +22 -22
- package/ios/RMFPolylineMap4d.m +15 -15
- package/ios/building/RMFBuilding.h +41 -41
- package/ios/building/RMFBuilding.m +104 -104
- package/ios/building/RMFBuildingManager.h +19 -19
- package/ios/building/RMFBuildingManager.m +133 -133
- package/ios/building/RMFBuildingMap4d.h +23 -23
- package/ios/building/RMFBuildingMap4d.m +15 -15
- package/ios/overlays/RMFTileOverlay.h +36 -36
- package/ios/overlays/RMFTileOverlay.m +64 -64
- package/ios/overlays/RMFTileOverlayManager.h +17 -17
- package/ios/overlays/RMFTileOverlayManager.m +27 -27
- package/lib/commonjs/components/MFBuilding.js +26 -26
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +20 -20
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +32 -32
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +133 -71
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +35 -35
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +20 -20
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +22 -22
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +18 -18
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +9 -9
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +311 -0
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -0
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/MFBuilding.js +26 -26
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +20 -20
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +32 -32
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +131 -71
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +35 -35
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +20 -20
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +22 -22
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +18 -18
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +9 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +302 -0
- package/lib/module/components/extends/AreaFocuser.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/Map4dMapView.d.ts +7 -7
- package/package.json +152 -152
- package/react-native-map4d-map.podspec +20 -20
- package/src/components/MFBuilding.js +187 -187
- package/src/components/MFCircle.js +173 -173
- package/src/components/MFDirectionsRenderer.js +237 -237
- package/src/components/MFMapView.js +447 -373
- package/src/components/MFMarker.js +246 -246
- package/src/components/MFPOI.js +184 -184
- package/src/components/MFPolygon.js +186 -186
- package/src/components/MFPolyline.js +172 -172
- package/src/components/MFTileOverlay.js +45 -45
- package/src/components/Map4dMapView.tsx +26 -26
- package/src/components/extends/AreaFocuser.js +339 -0
- package/src/index.js +23 -21
package/ios/RMFMarker.h
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFMarker.h
|
|
3
|
-
// Map4dMap
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 4/28/20.
|
|
6
|
-
// Copyright © 2020 IOTLink. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#ifndef RMFMarker_h
|
|
10
|
-
#define RMFMarker_h
|
|
11
|
-
|
|
12
|
-
#import <React/UIView+React.h>
|
|
13
|
-
#import <React/RCTBridge.h>
|
|
14
|
-
#import "RMFMarkerMap4d.h"
|
|
15
|
-
#import "RMFMapView.h"
|
|
16
|
-
#import "RMFIcon.h"
|
|
17
|
-
|
|
18
|
-
@interface RMFMarker : UIView
|
|
19
|
-
|
|
20
|
-
//@property (nonatomic, weak) RCTBridge *bridge;
|
|
21
|
-
@property (nonatomic, strong) RMFMarkerMap4d * map4dMarker;
|
|
22
|
-
|
|
23
|
-
@property (nonatomic, copy) RCTBubblingEventBlock _Nullable onPress;
|
|
24
|
-
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onPressInfoWindow;
|
|
25
|
-
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDragStart;
|
|
26
|
-
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDrag;
|
|
27
|
-
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDragEnd;
|
|
28
|
-
|
|
29
|
-
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;//position
|
|
30
|
-
@property (nonatomic, assign) CGPoint anchor;
|
|
31
|
-
@property (nonatomic, assign) double elevation;
|
|
32
|
-
@property (nonatomic, assign) double rotation;
|
|
33
|
-
@property (nonatomic, assign) BOOL draggable;
|
|
34
|
-
@property (nonatomic, assign) CGPoint infoWindowAnchor;
|
|
35
|
-
@property (nonatomic, copy, nullable) NSString *title;
|
|
36
|
-
@property (nonatomic, copy, nullable) NSString *snippet;
|
|
37
|
-
@property (nonatomic, copy, nullable) RMFIcon *icon;
|
|
38
|
-
@property (nonatomic, assign) float zIndex;
|
|
39
|
-
@property (nonatomic, assign) BOOL visible;
|
|
40
|
-
@property (nonatomic, copy, nullable) NSDictionary * userData;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- (void)didBeginDraggingMarkerAtPixel:(CGPoint)pixel;
|
|
44
|
-
|
|
45
|
-
- (void)didEndDraggingMarkerAtPixel:(CGPoint)pixel;
|
|
46
|
-
|
|
47
|
-
- (void)didDragMarkerAtPixel:(CGPoint)pixel;
|
|
48
|
-
|
|
49
|
-
- (void)didTapInfoWindowAtPixel:(CGPoint)pixel;
|
|
50
|
-
|
|
51
|
-
- (void)didTapAtPixel:(CGPoint)pixel;
|
|
52
|
-
|
|
53
|
-
- (void)setMapView:(RMFMapView* _Nullable)mapView;
|
|
54
|
-
|
|
55
|
-
@end
|
|
56
|
-
|
|
57
|
-
#endif /* RMFMarker_h */
|
|
1
|
+
//
|
|
2
|
+
// RMFMarker.h
|
|
3
|
+
// Map4dMap
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 4/28/20.
|
|
6
|
+
// Copyright © 2020 IOTLink. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef RMFMarker_h
|
|
10
|
+
#define RMFMarker_h
|
|
11
|
+
|
|
12
|
+
#import <React/UIView+React.h>
|
|
13
|
+
#import <React/RCTBridge.h>
|
|
14
|
+
#import "RMFMarkerMap4d.h"
|
|
15
|
+
#import "RMFMapView.h"
|
|
16
|
+
#import "RMFIcon.h"
|
|
17
|
+
|
|
18
|
+
@interface RMFMarker : UIView
|
|
19
|
+
|
|
20
|
+
//@property (nonatomic, weak) RCTBridge *bridge;
|
|
21
|
+
@property (nonatomic, strong) RMFMarkerMap4d * map4dMarker;
|
|
22
|
+
|
|
23
|
+
@property (nonatomic, copy) RCTBubblingEventBlock _Nullable onPress;
|
|
24
|
+
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onPressInfoWindow;
|
|
25
|
+
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDragStart;
|
|
26
|
+
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDrag;
|
|
27
|
+
@property (nonatomic, copy) RCTDirectEventBlock _Nullable onDragEnd;
|
|
28
|
+
|
|
29
|
+
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;//position
|
|
30
|
+
@property (nonatomic, assign) CGPoint anchor;
|
|
31
|
+
@property (nonatomic, assign) double elevation;
|
|
32
|
+
@property (nonatomic, assign) double rotation;
|
|
33
|
+
@property (nonatomic, assign) BOOL draggable;
|
|
34
|
+
@property (nonatomic, assign) CGPoint infoWindowAnchor;
|
|
35
|
+
@property (nonatomic, copy, nullable) NSString *title;
|
|
36
|
+
@property (nonatomic, copy, nullable) NSString *snippet;
|
|
37
|
+
@property (nonatomic, copy, nullable) RMFIcon *icon;
|
|
38
|
+
@property (nonatomic, assign) float zIndex;
|
|
39
|
+
@property (nonatomic, assign) BOOL visible;
|
|
40
|
+
@property (nonatomic, copy, nullable) NSDictionary * userData;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- (void)didBeginDraggingMarkerAtPixel:(CGPoint)pixel;
|
|
44
|
+
|
|
45
|
+
- (void)didEndDraggingMarkerAtPixel:(CGPoint)pixel;
|
|
46
|
+
|
|
47
|
+
- (void)didDragMarkerAtPixel:(CGPoint)pixel;
|
|
48
|
+
|
|
49
|
+
- (void)didTapInfoWindowAtPixel:(CGPoint)pixel;
|
|
50
|
+
|
|
51
|
+
- (void)didTapAtPixel:(CGPoint)pixel;
|
|
52
|
+
|
|
53
|
+
- (void)setMapView:(RMFMapView* _Nullable)mapView;
|
|
54
|
+
|
|
55
|
+
@end
|
|
56
|
+
|
|
57
|
+
#endif /* RMFMarker_h */
|
package/ios/RMFMarker.m
CHANGED
|
@@ -1,267 +1,267 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RMFMarker.m
|
|
3
|
-
// Map4dMap
|
|
4
|
-
//
|
|
5
|
-
// Created by Huy Dang on 4/28/20.
|
|
6
|
-
// Copyright © 2020 IOTLink. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import "RMFMarker.h"
|
|
10
|
-
#import <Foundation/Foundation.h>
|
|
11
|
-
#import <React/RCTLog.h>
|
|
12
|
-
#import <React/RCTImageView.h>
|
|
13
|
-
#import <Map4dMap/Map4dMap.h>
|
|
14
|
-
#import "RMFEventResponse.h"
|
|
15
|
-
#import "RMFDummyView.h"
|
|
16
|
-
|
|
17
|
-
@implementation RMFMarker {
|
|
18
|
-
// RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
|
19
|
-
UIView *_iconView;
|
|
20
|
-
NSMutableArray* observables;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
- (instancetype)init {
|
|
24
|
-
if ((self = [super init])) {
|
|
25
|
-
_map4dMarker = [[RMFMarkerMap4d alloc] init];
|
|
26
|
-
_map4dMarker.reactMarker = self;
|
|
27
|
-
|
|
28
|
-
_coordinate = _map4dMarker.position;
|
|
29
|
-
_anchor = _map4dMarker.groundAnchor;
|
|
30
|
-
_elevation = _map4dMarker.elevation;
|
|
31
|
-
_rotation = _map4dMarker.rotation;
|
|
32
|
-
_draggable = _map4dMarker.draggable;
|
|
33
|
-
_infoWindowAnchor = _map4dMarker.infoWindowAnchor;
|
|
34
|
-
_title = nil;//_map4dMarker.title;
|
|
35
|
-
_snippet = nil;//_map4dMarker.snippet;
|
|
36
|
-
_icon = nil;
|
|
37
|
-
_zIndex = _map4dMarker.zIndex;
|
|
38
|
-
_visible = true;//!_map4dMarker.isHidden;
|
|
39
|
-
_userData = nil;
|
|
40
|
-
_iconView = nil;
|
|
41
|
-
observables = [[NSMutableArray alloc] init];
|
|
42
|
-
}
|
|
43
|
-
return self;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
- (void)setMapView:(RMFMapView *)mapView {
|
|
47
|
-
if (mapView != nil) {
|
|
48
|
-
if (self.icon == nil) {
|
|
49
|
-
_map4dMarker.icon = nil;
|
|
50
|
-
} else {
|
|
51
|
-
_map4dMarker.icon = [UIImage imageWithCGImage:self.icon.image.CGImage scale:[UIScreen mainScreen].scale orientation:self.icon.image.imageOrientation];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
_map4dMarker.map = mapView;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Property */
|
|
58
|
-
|
|
59
|
-
- (void)setCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
60
|
-
_coordinate = coordinate;
|
|
61
|
-
_map4dMarker.position = coordinate;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
- (void)setAnchor:(CGPoint)anchor {
|
|
65
|
-
_anchor = anchor;
|
|
66
|
-
_map4dMarker.groundAnchor = anchor;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
- (void)setElevation:(double)elevation {
|
|
70
|
-
_elevation = elevation;
|
|
71
|
-
_map4dMarker.elevation = elevation;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
- (void)setRotation:(double)rotation {
|
|
75
|
-
_rotation = rotation;
|
|
76
|
-
_map4dMarker.rotation = rotation;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
- (void)setDraggable:(BOOL)draggable {
|
|
80
|
-
_draggable = draggable;
|
|
81
|
-
_map4dMarker.draggable = draggable;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
- (void) setInfoWindowAnchor:(CGPoint)infoWindowAnchor {
|
|
85
|
-
_infoWindowAnchor = infoWindowAnchor;
|
|
86
|
-
_map4dMarker.infoWindowAnchor = infoWindowAnchor;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
- (void)setTitle:(NSString *)title {
|
|
90
|
-
_title = title;
|
|
91
|
-
_map4dMarker.title = title;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
- (void)setSnippet:(NSString *)snippet {
|
|
95
|
-
_snippet = snippet;
|
|
96
|
-
_map4dMarker.snippet = snippet;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
- (void)setIcon:(RMFIcon *)icon {
|
|
100
|
-
_icon = icon;
|
|
101
|
-
if (icon == nil) {
|
|
102
|
-
_map4dMarker.icon = nil;
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
106
|
-
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: icon.uri]];
|
|
107
|
-
if (imageData != nil) {
|
|
108
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
109
|
-
self->_icon.image = [UIImage imageWithData:imageData];
|
|
110
|
-
if (self->_map4dMarker.map != nil) {
|
|
111
|
-
CGFloat scale = [UIScreen mainScreen].scale;
|
|
112
|
-
self->_map4dMarker.icon = [UIImage imageWithCGImage:[self->_icon.image CGImage] scale:scale orientation:self->_icon.image.imageOrientation];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
- (void)setZIndex:(float)zIndex {
|
|
120
|
-
_zIndex = zIndex;
|
|
121
|
-
_map4dMarker.zIndex = zIndex;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
- (void)setVisible:(BOOL)visible {
|
|
125
|
-
_visible = visible;
|
|
126
|
-
_map4dMarker.isHidden = !visible;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
- (void)setUserInteractionEnabled:(BOOL)enabled {
|
|
130
|
-
[super setUserInteractionEnabled:enabled];
|
|
131
|
-
_map4dMarker.userInteractionEnabled = enabled;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
- (void)setUserData:(NSDictionary *)userData {
|
|
135
|
-
_userData = userData;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
- (NSDictionary*)responseWithAction:(NSString*)action pixel:(CGPoint)pixel {
|
|
139
|
-
CLLocationCoordinate2D tapLocation = [_map4dMarker.map.projection coordinateForPoint:pixel];
|
|
140
|
-
NSMutableDictionary* response = [NSMutableDictionary dictionaryWithDictionary:[RMFEventResponse fromCoordinate:tapLocation
|
|
141
|
-
pixel:pixel]];
|
|
142
|
-
response[@"marker"] = @{
|
|
143
|
-
kRMFLatLngCoordinateResponseKey: [RMFEventResponse fromCoordinate:_map4dMarker.position],
|
|
144
|
-
@"userData": _userData != nil ? _userData : @{}
|
|
145
|
-
};
|
|
146
|
-
response[@"action"] = action;
|
|
147
|
-
return response;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** Event */
|
|
151
|
-
- (void)didBeginDraggingMarkerAtPixel:(CGPoint)pixel {
|
|
152
|
-
if (self.onDragStart) {
|
|
153
|
-
self.onDragStart([self responseWithAction:@"marker-drag-start" pixel:pixel]);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
- (void)didEndDraggingMarkerAtPixel:(CGPoint)pixel {
|
|
158
|
-
if (self.onDragEnd) {
|
|
159
|
-
self.onDragEnd([self responseWithAction:@"marker-drag-end" pixel:pixel]);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
- (void)didDragMarkerAtPixel:(CGPoint)pixel {
|
|
164
|
-
if (self.onDrag) {
|
|
165
|
-
self.onDrag([self responseWithAction:@"marker-drag" pixel:pixel]);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
- (void)didTapInfoWindowAtPixel:(CGPoint)pixel {
|
|
170
|
-
if (self.onPressInfoWindow) {
|
|
171
|
-
self.onPressInfoWindow([self responseWithAction:@"marker-info-window-press" pixel:pixel]);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
- (void)didTapAtPixel:(CGPoint)pixel {
|
|
176
|
-
if (self.onPress) {
|
|
177
|
-
self.onPress([self responseWithAction:@"marker-press" pixel:pixel]);
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
- (void)layoutSubviews {
|
|
182
|
-
[super layoutSubviews];
|
|
183
|
-
float width = 0;
|
|
184
|
-
float height = 0;
|
|
185
|
-
|
|
186
|
-
for (UIView *v in [_iconView subviews]) {
|
|
187
|
-
float fw = v.frame.origin.x + v.frame.size.width;
|
|
188
|
-
float fh = v.frame.origin.y + v.frame.size.height;
|
|
189
|
-
|
|
190
|
-
width = MAX(fw, width);
|
|
191
|
-
height = MAX(fh, height);
|
|
192
|
-
}
|
|
193
|
-
[_iconView setFrame:CGRectMake(0, 0, width, height)];
|
|
194
|
-
[self->_map4dMarker setIconView:_iconView];
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
- (void)iconViewInsertSubview:(UIView*)subview atIndex:(NSInteger)atIndex {
|
|
198
|
-
if (!_map4dMarker.iconView) {
|
|
199
|
-
_iconView = [[UIView alloc] init];
|
|
200
|
-
_map4dMarker.iconView = _iconView;
|
|
201
|
-
}
|
|
202
|
-
[_iconView insertSubview:subview atIndex:atIndex];
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
- (void) removeAllObserver {
|
|
206
|
-
for (UIView* v in observables) {
|
|
207
|
-
[v removeObserver:self forKeyPath:@"image"];
|
|
208
|
-
[v removeObserver:self forKeyPath:@"bounds"];
|
|
209
|
-
}
|
|
210
|
-
[observables removeAllObjects];
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
|
|
214
|
-
{
|
|
215
|
-
UIApplicationState appState = [[UIApplication sharedApplication] applicationState];
|
|
216
|
-
if (context == (__bridge void * _Nullable)(_iconView)) {
|
|
217
|
-
if (_map4dMarker != NULL) {
|
|
218
|
-
//TODO: remove me
|
|
219
|
-
//RCTImageView will clear image when window == nil or app go to background mode --> causes a bug, marker is updated without image.
|
|
220
|
-
//TODO: how to fix if we stop cheating?
|
|
221
|
-
if (context == (__bridge void * _Nullable) self.map4dMarker.iconView
|
|
222
|
-
&& (!self.window || appState == UIApplicationStateBackground)
|
|
223
|
-
) {
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
[self.map4dMarker setIconView:_iconView];
|
|
227
|
-
}
|
|
228
|
-
} else {
|
|
229
|
-
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
- (void)addObserver:(UIView*)view {
|
|
234
|
-
if ([view isKindOfClass:[RCTImageView class]]) {
|
|
235
|
-
[view addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:(__bridge void * _Nullable)(_iconView)];
|
|
236
|
-
[view addObserver:self forKeyPath:@"bounds" options:NSKeyValueObservingOptionNew context:(__bridge void * _Nullable)(_iconView)];
|
|
237
|
-
[observables addObject:view];
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
NSArray<UIView *> *reactSubviews = [view reactSubviews];
|
|
241
|
-
for (int i = 0; i < reactSubviews.count; i++) {
|
|
242
|
-
UIView* view = [reactSubviews objectAtIndex:i];
|
|
243
|
-
[self addObserver:view];
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
- (void)insertReactSubview:(id<RCTComponent>)subview atIndex:(NSInteger)atIndex {
|
|
249
|
-
[self iconViewInsertSubview:(UIView*)subview atIndex:atIndex+1];
|
|
250
|
-
[self removeAllObserver];
|
|
251
|
-
[self addObserver:(UIView *) subview];
|
|
252
|
-
RMFDummyView *dummySubview = [[RMFDummyView alloc] initWithView:(UIView *)subview];
|
|
253
|
-
[super insertReactSubview:(UIView*)dummySubview atIndex:atIndex];
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
- (void)removeReactSubview:(id<RCTComponent>)dummySubview {
|
|
257
|
-
[self removeAllObserver];
|
|
258
|
-
UIView* subview = ((RMFDummyView*)dummySubview).view;
|
|
259
|
-
[(UIView*)subview removeFromSuperview];
|
|
260
|
-
[super removeReactSubview:(UIView*)dummySubview];
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
- (void)dealloc {
|
|
264
|
-
[self removeAllObserver];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
@end
|
|
1
|
+
//
|
|
2
|
+
// RMFMarker.m
|
|
3
|
+
// Map4dMap
|
|
4
|
+
//
|
|
5
|
+
// Created by Huy Dang on 4/28/20.
|
|
6
|
+
// Copyright © 2020 IOTLink. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "RMFMarker.h"
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <React/RCTLog.h>
|
|
12
|
+
#import <React/RCTImageView.h>
|
|
13
|
+
#import <Map4dMap/Map4dMap.h>
|
|
14
|
+
#import "RMFEventResponse.h"
|
|
15
|
+
#import "RMFDummyView.h"
|
|
16
|
+
|
|
17
|
+
@implementation RMFMarker {
|
|
18
|
+
// RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
|
19
|
+
UIView *_iconView;
|
|
20
|
+
NSMutableArray* observables;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (instancetype)init {
|
|
24
|
+
if ((self = [super init])) {
|
|
25
|
+
_map4dMarker = [[RMFMarkerMap4d alloc] init];
|
|
26
|
+
_map4dMarker.reactMarker = self;
|
|
27
|
+
|
|
28
|
+
_coordinate = _map4dMarker.position;
|
|
29
|
+
_anchor = _map4dMarker.groundAnchor;
|
|
30
|
+
_elevation = _map4dMarker.elevation;
|
|
31
|
+
_rotation = _map4dMarker.rotation;
|
|
32
|
+
_draggable = _map4dMarker.draggable;
|
|
33
|
+
_infoWindowAnchor = _map4dMarker.infoWindowAnchor;
|
|
34
|
+
_title = nil;//_map4dMarker.title;
|
|
35
|
+
_snippet = nil;//_map4dMarker.snippet;
|
|
36
|
+
_icon = nil;
|
|
37
|
+
_zIndex = _map4dMarker.zIndex;
|
|
38
|
+
_visible = true;//!_map4dMarker.isHidden;
|
|
39
|
+
_userData = nil;
|
|
40
|
+
_iconView = nil;
|
|
41
|
+
observables = [[NSMutableArray alloc] init];
|
|
42
|
+
}
|
|
43
|
+
return self;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (void)setMapView:(RMFMapView *)mapView {
|
|
47
|
+
if (mapView != nil) {
|
|
48
|
+
if (self.icon == nil) {
|
|
49
|
+
_map4dMarker.icon = nil;
|
|
50
|
+
} else {
|
|
51
|
+
_map4dMarker.icon = [UIImage imageWithCGImage:self.icon.image.CGImage scale:[UIScreen mainScreen].scale orientation:self.icon.image.imageOrientation];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
_map4dMarker.map = mapView;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Property */
|
|
58
|
+
|
|
59
|
+
- (void)setCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
60
|
+
_coordinate = coordinate;
|
|
61
|
+
_map4dMarker.position = coordinate;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
- (void)setAnchor:(CGPoint)anchor {
|
|
65
|
+
_anchor = anchor;
|
|
66
|
+
_map4dMarker.groundAnchor = anchor;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
- (void)setElevation:(double)elevation {
|
|
70
|
+
_elevation = elevation;
|
|
71
|
+
_map4dMarker.elevation = elevation;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
- (void)setRotation:(double)rotation {
|
|
75
|
+
_rotation = rotation;
|
|
76
|
+
_map4dMarker.rotation = rotation;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
- (void)setDraggable:(BOOL)draggable {
|
|
80
|
+
_draggable = draggable;
|
|
81
|
+
_map4dMarker.draggable = draggable;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
- (void) setInfoWindowAnchor:(CGPoint)infoWindowAnchor {
|
|
85
|
+
_infoWindowAnchor = infoWindowAnchor;
|
|
86
|
+
_map4dMarker.infoWindowAnchor = infoWindowAnchor;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
- (void)setTitle:(NSString *)title {
|
|
90
|
+
_title = title;
|
|
91
|
+
_map4dMarker.title = title;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
- (void)setSnippet:(NSString *)snippet {
|
|
95
|
+
_snippet = snippet;
|
|
96
|
+
_map4dMarker.snippet = snippet;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
- (void)setIcon:(RMFIcon *)icon {
|
|
100
|
+
_icon = icon;
|
|
101
|
+
if (icon == nil) {
|
|
102
|
+
_map4dMarker.icon = nil;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
dispatch_async(dispatch_get_global_queue(0,0), ^{
|
|
106
|
+
NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: icon.uri]];
|
|
107
|
+
if (imageData != nil) {
|
|
108
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
109
|
+
self->_icon.image = [UIImage imageWithData:imageData];
|
|
110
|
+
if (self->_map4dMarker.map != nil) {
|
|
111
|
+
CGFloat scale = [UIScreen mainScreen].scale;
|
|
112
|
+
self->_map4dMarker.icon = [UIImage imageWithCGImage:[self->_icon.image CGImage] scale:scale orientation:self->_icon.image.imageOrientation];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
- (void)setZIndex:(float)zIndex {
|
|
120
|
+
_zIndex = zIndex;
|
|
121
|
+
_map4dMarker.zIndex = zIndex;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
- (void)setVisible:(BOOL)visible {
|
|
125
|
+
_visible = visible;
|
|
126
|
+
_map4dMarker.isHidden = !visible;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
- (void)setUserInteractionEnabled:(BOOL)enabled {
|
|
130
|
+
[super setUserInteractionEnabled:enabled];
|
|
131
|
+
_map4dMarker.userInteractionEnabled = enabled;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
- (void)setUserData:(NSDictionary *)userData {
|
|
135
|
+
_userData = userData;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
- (NSDictionary*)responseWithAction:(NSString*)action pixel:(CGPoint)pixel {
|
|
139
|
+
CLLocationCoordinate2D tapLocation = [_map4dMarker.map.projection coordinateForPoint:pixel];
|
|
140
|
+
NSMutableDictionary* response = [NSMutableDictionary dictionaryWithDictionary:[RMFEventResponse fromCoordinate:tapLocation
|
|
141
|
+
pixel:pixel]];
|
|
142
|
+
response[@"marker"] = @{
|
|
143
|
+
kRMFLatLngCoordinateResponseKey: [RMFEventResponse fromCoordinate:_map4dMarker.position],
|
|
144
|
+
@"userData": _userData != nil ? _userData : @{}
|
|
145
|
+
};
|
|
146
|
+
response[@"action"] = action;
|
|
147
|
+
return response;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** Event */
|
|
151
|
+
- (void)didBeginDraggingMarkerAtPixel:(CGPoint)pixel {
|
|
152
|
+
if (self.onDragStart) {
|
|
153
|
+
self.onDragStart([self responseWithAction:@"marker-drag-start" pixel:pixel]);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
- (void)didEndDraggingMarkerAtPixel:(CGPoint)pixel {
|
|
158
|
+
if (self.onDragEnd) {
|
|
159
|
+
self.onDragEnd([self responseWithAction:@"marker-drag-end" pixel:pixel]);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
- (void)didDragMarkerAtPixel:(CGPoint)pixel {
|
|
164
|
+
if (self.onDrag) {
|
|
165
|
+
self.onDrag([self responseWithAction:@"marker-drag" pixel:pixel]);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
- (void)didTapInfoWindowAtPixel:(CGPoint)pixel {
|
|
170
|
+
if (self.onPressInfoWindow) {
|
|
171
|
+
self.onPressInfoWindow([self responseWithAction:@"marker-info-window-press" pixel:pixel]);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
- (void)didTapAtPixel:(CGPoint)pixel {
|
|
176
|
+
if (self.onPress) {
|
|
177
|
+
self.onPress([self responseWithAction:@"marker-press" pixel:pixel]);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
- (void)layoutSubviews {
|
|
182
|
+
[super layoutSubviews];
|
|
183
|
+
float width = 0;
|
|
184
|
+
float height = 0;
|
|
185
|
+
|
|
186
|
+
for (UIView *v in [_iconView subviews]) {
|
|
187
|
+
float fw = v.frame.origin.x + v.frame.size.width;
|
|
188
|
+
float fh = v.frame.origin.y + v.frame.size.height;
|
|
189
|
+
|
|
190
|
+
width = MAX(fw, width);
|
|
191
|
+
height = MAX(fh, height);
|
|
192
|
+
}
|
|
193
|
+
[_iconView setFrame:CGRectMake(0, 0, width, height)];
|
|
194
|
+
[self->_map4dMarker setIconView:_iconView];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
- (void)iconViewInsertSubview:(UIView*)subview atIndex:(NSInteger)atIndex {
|
|
198
|
+
if (!_map4dMarker.iconView) {
|
|
199
|
+
_iconView = [[UIView alloc] init];
|
|
200
|
+
_map4dMarker.iconView = _iconView;
|
|
201
|
+
}
|
|
202
|
+
[_iconView insertSubview:subview atIndex:atIndex];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
- (void) removeAllObserver {
|
|
206
|
+
for (UIView* v in observables) {
|
|
207
|
+
[v removeObserver:self forKeyPath:@"image"];
|
|
208
|
+
[v removeObserver:self forKeyPath:@"bounds"];
|
|
209
|
+
}
|
|
210
|
+
[observables removeAllObjects];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
|
|
214
|
+
{
|
|
215
|
+
UIApplicationState appState = [[UIApplication sharedApplication] applicationState];
|
|
216
|
+
if (context == (__bridge void * _Nullable)(_iconView)) {
|
|
217
|
+
if (_map4dMarker != NULL) {
|
|
218
|
+
//TODO: remove me
|
|
219
|
+
//RCTImageView will clear image when window == nil or app go to background mode --> causes a bug, marker is updated without image.
|
|
220
|
+
//TODO: how to fix if we stop cheating?
|
|
221
|
+
if (context == (__bridge void * _Nullable) self.map4dMarker.iconView
|
|
222
|
+
&& (!self.window || appState == UIApplicationStateBackground)
|
|
223
|
+
) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
[self.map4dMarker setIconView:_iconView];
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
- (void)addObserver:(UIView*)view {
|
|
234
|
+
if ([view isKindOfClass:[RCTImageView class]]) {
|
|
235
|
+
[view addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:(__bridge void * _Nullable)(_iconView)];
|
|
236
|
+
[view addObserver:self forKeyPath:@"bounds" options:NSKeyValueObservingOptionNew context:(__bridge void * _Nullable)(_iconView)];
|
|
237
|
+
[observables addObject:view];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
NSArray<UIView *> *reactSubviews = [view reactSubviews];
|
|
241
|
+
for (int i = 0; i < reactSubviews.count; i++) {
|
|
242
|
+
UIView* view = [reactSubviews objectAtIndex:i];
|
|
243
|
+
[self addObserver:view];
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
- (void)insertReactSubview:(id<RCTComponent>)subview atIndex:(NSInteger)atIndex {
|
|
249
|
+
[self iconViewInsertSubview:(UIView*)subview atIndex:atIndex+1];
|
|
250
|
+
[self removeAllObserver];
|
|
251
|
+
[self addObserver:(UIView *) subview];
|
|
252
|
+
RMFDummyView *dummySubview = [[RMFDummyView alloc] initWithView:(UIView *)subview];
|
|
253
|
+
[super insertReactSubview:(UIView*)dummySubview atIndex:atIndex];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
- (void)removeReactSubview:(id<RCTComponent>)dummySubview {
|
|
257
|
+
[self removeAllObserver];
|
|
258
|
+
UIView* subview = ((RMFDummyView*)dummySubview).view;
|
|
259
|
+
[(UIView*)subview removeFromSuperview];
|
|
260
|
+
[super removeReactSubview:(UIView*)dummySubview];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
- (void)dealloc {
|
|
264
|
+
[self removeAllObserver];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@end
|