react-native-map4d-map-dtqg 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +133 -41
  3. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  10. package/android/.gradle/vcs-1/gc.properties +0 -0
  11. package/android/build.gradle +60 -60
  12. package/android/src/main/AndroidManifest.xml +4 -4
  13. package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
  14. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
  15. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
  16. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
  17. package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
  18. package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
  19. package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
  20. package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
  21. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
  22. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
  23. package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
  24. package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
  25. package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +231 -226
  26. package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
  27. package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
  28. package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
  29. package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
  30. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
  31. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
  32. package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
  33. package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
  34. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
  35. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
  36. package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
  37. package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
  38. package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
  39. package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
  40. package/ios/Map4dMap.h +7 -7
  41. package/ios/Map4dMap.m +14 -14
  42. package/ios/Map4dMapViewManager.m +34 -34
  43. package/ios/RCTConvert+Map4dMap.h +33 -33
  44. package/ios/RCTConvert+Map4dMap.m +112 -112
  45. package/ios/RMFCircle.h +37 -37
  46. package/ios/RMFCircle.m +100 -100
  47. package/ios/RMFCircleManager.h +18 -18
  48. package/ios/RMFCircleManager.m +155 -155
  49. package/ios/RMFCircleMap4d.h +23 -23
  50. package/ios/RMFCircleMap4d.m +13 -13
  51. package/ios/RMFCoordinate.h +22 -22
  52. package/ios/RMFCoordinate.m +13 -13
  53. package/ios/RMFDirectionsMarkerOptions.h +24 -24
  54. package/ios/RMFDirectionsMarkerOptions.m +23 -23
  55. package/ios/RMFDirectionsRenderer.h +47 -47
  56. package/ios/RMFDirectionsRenderer.m +182 -182
  57. package/ios/RMFDirectionsRendererManager.h +17 -17
  58. package/ios/RMFDirectionsRendererManager.m +84 -84
  59. package/ios/RMFDirectionsRendererMap4d.h +21 -21
  60. package/ios/RMFDirectionsRendererMap4d.m +12 -12
  61. package/ios/RMFDummyView.h +6 -6
  62. package/ios/RMFDummyView.m +12 -12
  63. package/ios/RMFEventResponse.h +39 -39
  64. package/ios/RMFEventResponse.m +98 -98
  65. package/ios/RMFIcon.h +24 -24
  66. package/ios/RMFIcon.m +35 -35
  67. package/ios/RMFMapView.h +84 -84
  68. package/ios/RMFMapView.m +376 -376
  69. package/ios/RMFMapViewManager.h +17 -17
  70. package/ios/RMFMapViewManager.m +508 -493
  71. package/ios/RMFMarker.h +57 -57
  72. package/ios/RMFMarker.m +267 -267
  73. package/ios/RMFMarkerManager.h +17 -17
  74. package/ios/RMFMarkerManager.m +156 -156
  75. package/ios/RMFMarkerMap4d.h +19 -19
  76. package/ios/RMFMarkerMap4d.m +13 -13
  77. package/ios/RMFPOI.h +38 -38
  78. package/ios/RMFPOI.m +123 -123
  79. package/ios/RMFPOIManager.h +18 -18
  80. package/ios/RMFPOIManager.m +168 -168
  81. package/ios/RMFPOIMap4d.h +22 -22
  82. package/ios/RMFPOIMap4d.m +12 -12
  83. package/ios/RMFPolygon.h +41 -41
  84. package/ios/RMFPolygon.m +106 -106
  85. package/ios/RMFPolygonManager.h +18 -18
  86. package/ios/RMFPolygonManager.m +141 -141
  87. package/ios/RMFPolygonMap4d.h +23 -23
  88. package/ios/RMFPolygonMap4d.m +15 -15
  89. package/ios/RMFPolyline.h +38 -38
  90. package/ios/RMFPolyline.m +101 -101
  91. package/ios/RMFPolylineManager.h +18 -18
  92. package/ios/RMFPolylineManager.m +139 -139
  93. package/ios/RMFPolylineMap4d.h +22 -22
  94. package/ios/RMFPolylineMap4d.m +15 -15
  95. package/ios/building/RMFBuilding.h +41 -41
  96. package/ios/building/RMFBuilding.m +104 -104
  97. package/ios/building/RMFBuildingManager.h +19 -19
  98. package/ios/building/RMFBuildingManager.m +133 -133
  99. package/ios/building/RMFBuildingMap4d.h +23 -23
  100. package/ios/building/RMFBuildingMap4d.m +15 -15
  101. package/ios/overlays/RMFTileOverlay.h +36 -36
  102. package/ios/overlays/RMFTileOverlay.m +64 -64
  103. package/ios/overlays/RMFTileOverlayManager.h +17 -17
  104. package/ios/overlays/RMFTileOverlayManager.m +27 -27
  105. package/lib/commonjs/components/MFBanDoSo.js +109 -0
  106. package/lib/commonjs/components/MFBanDoSo.js.map +1 -0
  107. package/lib/commonjs/components/MFBuilding.js +26 -26
  108. package/lib/commonjs/components/MFBuilding.js.map +1 -1
  109. package/lib/commonjs/components/MFCircle.js +20 -20
  110. package/lib/commonjs/components/MFCircle.js.map +1 -1
  111. package/lib/commonjs/components/MFDirectionsRenderer.js +32 -32
  112. package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
  113. package/lib/commonjs/components/MFMapView.js +152 -71
  114. package/lib/commonjs/components/MFMapView.js.map +1 -1
  115. package/lib/commonjs/components/MFMarker.js +35 -35
  116. package/lib/commonjs/components/MFMarker.js.map +1 -1
  117. package/lib/commonjs/components/MFPOI.js +20 -20
  118. package/lib/commonjs/components/MFPOI.js.map +1 -1
  119. package/lib/commonjs/components/MFPolygon.js +22 -22
  120. package/lib/commonjs/components/MFPolygon.js.map +1 -1
  121. package/lib/commonjs/components/MFPolyline.js +18 -18
  122. package/lib/commonjs/components/MFPolyline.js.map +1 -1
  123. package/lib/commonjs/components/MFTileOverlay.js +9 -9
  124. package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
  125. package/lib/commonjs/components/Map4dMapView.js.map +1 -1
  126. package/lib/commonjs/components/extends/AreaFocusManager.js +205 -0
  127. package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -0
  128. package/lib/commonjs/components/extends/AreaFocuser.js +73 -0
  129. package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -0
  130. package/lib/commonjs/components/extends/BoundHelper.js +36 -0
  131. package/lib/commonjs/components/extends/BoundHelper.js.map +1 -0
  132. package/lib/commonjs/components/extends/area/AreaFocusAreas.js +167 -0
  133. package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -0
  134. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +164 -0
  135. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -0
  136. package/lib/commonjs/components/extends/area/AreaFocusSession.js +100 -0
  137. package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -0
  138. package/lib/commonjs/components/extends/area/AreaFocusTypes.js +40 -0
  139. package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -0
  140. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +2288 -0
  141. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -0
  142. package/lib/commonjs/components/internal/GeojsonStyleUtils.js +139 -0
  143. package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -0
  144. package/lib/commonjs/index.js +16 -0
  145. package/lib/commonjs/index.js.map +1 -1
  146. package/lib/module/components/MFBanDoSo.js +92 -0
  147. package/lib/module/components/MFBanDoSo.js.map +1 -0
  148. package/lib/module/components/MFBuilding.js +26 -26
  149. package/lib/module/components/MFBuilding.js.map +1 -1
  150. package/lib/module/components/MFCircle.js +20 -20
  151. package/lib/module/components/MFCircle.js.map +1 -1
  152. package/lib/module/components/MFDirectionsRenderer.js +32 -32
  153. package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
  154. package/lib/module/components/MFMapView.js +149 -71
  155. package/lib/module/components/MFMapView.js.map +1 -1
  156. package/lib/module/components/MFMarker.js +35 -35
  157. package/lib/module/components/MFMarker.js.map +1 -1
  158. package/lib/module/components/MFPOI.js +20 -20
  159. package/lib/module/components/MFPOI.js.map +1 -1
  160. package/lib/module/components/MFPolygon.js +22 -22
  161. package/lib/module/components/MFPolygon.js.map +1 -1
  162. package/lib/module/components/MFPolyline.js +18 -18
  163. package/lib/module/components/MFPolyline.js.map +1 -1
  164. package/lib/module/components/MFTileOverlay.js +9 -9
  165. package/lib/module/components/MFTileOverlay.js.map +1 -1
  166. package/lib/module/components/Map4dMapView.js.map +1 -1
  167. package/lib/module/components/extends/AreaFocusManager.js +193 -0
  168. package/lib/module/components/extends/AreaFocusManager.js.map +1 -0
  169. package/lib/module/components/extends/AreaFocuser.js +64 -0
  170. package/lib/module/components/extends/AreaFocuser.js.map +1 -0
  171. package/lib/module/components/extends/BoundHelper.js +29 -0
  172. package/lib/module/components/extends/BoundHelper.js.map +1 -0
  173. package/lib/module/components/extends/area/AreaFocusAreas.js +156 -0
  174. package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -0
  175. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +153 -0
  176. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -0
  177. package/lib/module/components/extends/area/AreaFocusSession.js +93 -0
  178. package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -0
  179. package/lib/module/components/extends/area/AreaFocusTypes.js +33 -0
  180. package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -0
  181. package/lib/module/components/internal/DefaultRoadmapStyle.js +2281 -0
  182. package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -0
  183. package/lib/module/components/internal/GeojsonStyleUtils.js +130 -0
  184. package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -0
  185. package/lib/module/index.js +3 -1
  186. package/lib/module/index.js.map +1 -1
  187. package/lib/typescript/components/Map4dMapView.d.ts +7 -7
  188. package/package.json +152 -152
  189. package/react-native-map4d-map.podspec +20 -20
  190. package/src/components/MFBanDoSo.js +124 -0
  191. package/src/components/MFBuilding.js +187 -187
  192. package/src/components/MFCircle.js +173 -173
  193. package/src/components/MFDirectionsRenderer.js +237 -237
  194. package/src/components/MFMapView.js +464 -373
  195. package/src/components/MFMarker.js +246 -246
  196. package/src/components/MFPOI.js +184 -184
  197. package/src/components/MFPolygon.js +186 -186
  198. package/src/components/MFPolyline.js +172 -172
  199. package/src/components/MFTileOverlay.js +45 -45
  200. package/src/components/Map4dMapView.tsx +26 -26
  201. package/src/components/extends/AreaFocusManager.js +196 -0
  202. package/src/components/extends/AreaFocuser.js +62 -0
  203. package/src/components/extends/BoundHelper.js +32 -0
  204. package/src/components/extends/area/AreaFocusAreas.js +164 -0
  205. package/src/components/extends/area/AreaFocusGeometryUtils.js +164 -0
  206. package/src/components/extends/area/AreaFocusSession.js +100 -0
  207. package/src/components/extends/area/AreaFocusTypes.js +36 -0
  208. package/src/components/internal/DefaultRoadmapStyle.js +3365 -0
  209. package/src/components/internal/GeojsonStyleUtils.js +143 -0
  210. package/src/index.js +25 -21
@@ -1,23 +1,23 @@
1
- //
2
- // RMFBuildingMap4d.h
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 6/10/25.
6
- // Copyright © 2025 IOTLink. All rights reserved.
7
- //
8
-
9
- #ifndef RMFBuildingMap4d_h
10
- #define RMFBuildingMap4d_h
11
-
12
- #import <Map4dMap/Map4dMap.h>
13
-
14
- @class RMFBuilding;
15
-
16
- @interface RMFBuildingMap4d : MFBuilding
17
-
18
- @property (nonatomic, weak) RMFBuilding *reactBuilding;
19
-
20
- @end
21
-
22
-
23
- #endif /* RMFBuildingMap4d_h */
1
+ //
2
+ // RMFBuildingMap4d.h
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 6/10/25.
6
+ // Copyright © 2025 IOTLink. All rights reserved.
7
+ //
8
+
9
+ #ifndef RMFBuildingMap4d_h
10
+ #define RMFBuildingMap4d_h
11
+
12
+ #import <Map4dMap/Map4dMap.h>
13
+
14
+ @class RMFBuilding;
15
+
16
+ @interface RMFBuildingMap4d : MFBuilding
17
+
18
+ @property (nonatomic, weak) RMFBuilding *reactBuilding;
19
+
20
+ @end
21
+
22
+
23
+ #endif /* RMFBuildingMap4d_h */
@@ -1,15 +1,15 @@
1
- //
2
- // RMFBuildingMap4d.m
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 6/10/25.
6
- // Copyright © 2025 IOTLink. All rights reserved.
7
- //
8
-
9
- #import "RMFBuildingMap4d.h"
10
-
11
- @implementation RMFBuildingMap4d
12
-
13
-
14
-
15
- @end
1
+ //
2
+ // RMFBuildingMap4d.m
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 6/10/25.
6
+ // Copyright © 2025 IOTLink. All rights reserved.
7
+ //
8
+
9
+ #import "RMFBuildingMap4d.h"
10
+
11
+ @implementation RMFBuildingMap4d
12
+
13
+
14
+
15
+ @end
@@ -1,36 +1,36 @@
1
- //
2
- // RMFTileOverlay.h
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 12/15/21.
6
- //
7
-
8
- #ifndef RMFTileOverlay_h
9
- #define RMFTileOverlay_h
10
-
11
- #import <React/UIView+React.h>
12
- #import <Map4dMap/Map4dMap.h>
13
- #import "RMFMapView.h"
14
-
15
- @class RMFTileOverlay;
16
-
17
- @interface RMFTileURLConstructor : NSObject<MFTileURLConstructor>
18
- @property(nonatomic, weak, nullable) RMFTileOverlay *reactTileOverlay;
19
- @end
20
-
21
- #pragma mark - RMFTileOverlay
22
-
23
- @interface RMFTileOverlay : UIView
24
-
25
- @property(nonatomic, strong, nullable) MFURLTileLayer* urlTileLayer;
26
-
27
- @property(nonatomic, strong, nullable) NSString *urlTemplate;
28
- @property(nonatomic, assign) float zIndex;
29
- @property(nonatomic, assign) BOOL visible;
30
-
31
- - (void)setMapView:(RMFMapView* _Nullable)mapView;
32
-
33
- @end
34
-
35
-
36
- #endif /* RMFTileOverlay_h */
1
+ //
2
+ // RMFTileOverlay.h
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 12/15/21.
6
+ //
7
+
8
+ #ifndef RMFTileOverlay_h
9
+ #define RMFTileOverlay_h
10
+
11
+ #import <React/UIView+React.h>
12
+ #import <Map4dMap/Map4dMap.h>
13
+ #import "RMFMapView.h"
14
+
15
+ @class RMFTileOverlay;
16
+
17
+ @interface RMFTileURLConstructor : NSObject<MFTileURLConstructor>
18
+ @property(nonatomic, weak, nullable) RMFTileOverlay *reactTileOverlay;
19
+ @end
20
+
21
+ #pragma mark - RMFTileOverlay
22
+
23
+ @interface RMFTileOverlay : UIView
24
+
25
+ @property(nonatomic, strong, nullable) MFURLTileLayer* urlTileLayer;
26
+
27
+ @property(nonatomic, strong, nullable) NSString *urlTemplate;
28
+ @property(nonatomic, assign) float zIndex;
29
+ @property(nonatomic, assign) BOOL visible;
30
+
31
+ - (void)setMapView:(RMFMapView* _Nullable)mapView;
32
+
33
+ @end
34
+
35
+
36
+ #endif /* RMFTileOverlay_h */
@@ -1,64 +1,64 @@
1
- //
2
- // RMFTileOverlay.m
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 12/15/21.
6
- //
7
-
8
- #import "RMFTileOverlay.h"
9
-
10
- @implementation RMFTileURLConstructor
11
-
12
- - (NSURL * _Nullable)getTileUrlWithX:(NSUInteger)x y:(NSUInteger)y zoom:(NSUInteger)zoom {
13
- if (_reactTileOverlay.urlTemplate == nil) {
14
- return nil;
15
- }
16
-
17
- NSString* url = _reactTileOverlay.urlTemplate;
18
- if ([url containsString:@"{z}"]) {
19
- url = [url stringByReplacingOccurrencesOfString:@"{z}" withString:[@(zoom) stringValue]];
20
- }
21
- else {
22
- url = [url stringByReplacingOccurrencesOfString:@"{zoom}" withString:[@(zoom) stringValue]];
23
- }
24
- url = [url stringByReplacingOccurrencesOfString:@"{x}" withString:[@(x) stringValue]];
25
- url = [url stringByReplacingOccurrencesOfString:@"{y}" withString:[@(y) stringValue]];
26
- return [NSURL URLWithString:url];
27
- }
28
-
29
- @end
30
-
31
- @implementation RMFTileOverlay
32
-
33
- - (instancetype)init {
34
- if (self = [super init]) {
35
- RMFTileURLConstructor* constructor = [[RMFTileURLConstructor alloc] init];
36
- constructor.reactTileOverlay = self;
37
-
38
- _urlTileLayer = [MFURLTileLayer tileLayerWithURLConstructor:constructor];
39
- }
40
- return self;
41
- }
42
-
43
- - (void)setMapView:(RMFMapView *)mapView {
44
- _urlTileLayer.map = mapView;
45
- }
46
-
47
- - (void)setUrlTemplate:(NSString *)urlTemplate {
48
- _urlTemplate = urlTemplate;
49
- if (_urlTileLayer.map != nil) {
50
- [_urlTileLayer clearTileCache];
51
- }
52
- }
53
-
54
- - (void)setVisible:(BOOL)visible {
55
- _visible = visible;
56
- _urlTileLayer.isHidden = !visible;
57
- }
58
-
59
- - (void)setZIndex:(float)zIndex {
60
- _zIndex = zIndex;
61
- _urlTileLayer.zIndex = zIndex;
62
- }
63
-
64
- @end
1
+ //
2
+ // RMFTileOverlay.m
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 12/15/21.
6
+ //
7
+
8
+ #import "RMFTileOverlay.h"
9
+
10
+ @implementation RMFTileURLConstructor
11
+
12
+ - (NSURL * _Nullable)getTileUrlWithX:(NSUInteger)x y:(NSUInteger)y zoom:(NSUInteger)zoom {
13
+ if (_reactTileOverlay.urlTemplate == nil) {
14
+ return nil;
15
+ }
16
+
17
+ NSString* url = _reactTileOverlay.urlTemplate;
18
+ if ([url containsString:@"{z}"]) {
19
+ url = [url stringByReplacingOccurrencesOfString:@"{z}" withString:[@(zoom) stringValue]];
20
+ }
21
+ else {
22
+ url = [url stringByReplacingOccurrencesOfString:@"{zoom}" withString:[@(zoom) stringValue]];
23
+ }
24
+ url = [url stringByReplacingOccurrencesOfString:@"{x}" withString:[@(x) stringValue]];
25
+ url = [url stringByReplacingOccurrencesOfString:@"{y}" withString:[@(y) stringValue]];
26
+ return [NSURL URLWithString:url];
27
+ }
28
+
29
+ @end
30
+
31
+ @implementation RMFTileOverlay
32
+
33
+ - (instancetype)init {
34
+ if (self = [super init]) {
35
+ RMFTileURLConstructor* constructor = [[RMFTileURLConstructor alloc] init];
36
+ constructor.reactTileOverlay = self;
37
+
38
+ _urlTileLayer = [MFURLTileLayer tileLayerWithURLConstructor:constructor];
39
+ }
40
+ return self;
41
+ }
42
+
43
+ - (void)setMapView:(RMFMapView *)mapView {
44
+ _urlTileLayer.map = mapView;
45
+ }
46
+
47
+ - (void)setUrlTemplate:(NSString *)urlTemplate {
48
+ _urlTemplate = urlTemplate;
49
+ if (_urlTileLayer.map != nil) {
50
+ [_urlTileLayer clearTileCache];
51
+ }
52
+ }
53
+
54
+ - (void)setVisible:(BOOL)visible {
55
+ _visible = visible;
56
+ _urlTileLayer.isHidden = !visible;
57
+ }
58
+
59
+ - (void)setZIndex:(float)zIndex {
60
+ _zIndex = zIndex;
61
+ _urlTileLayer.zIndex = zIndex;
62
+ }
63
+
64
+ @end
@@ -1,17 +1,17 @@
1
- //
2
- // RMFTileOverlayManager.h
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 12/15/21.
6
- //
7
-
8
- #ifndef RMFTileOverlayManager_h
9
- #define RMFTileOverlayManager_h
10
-
11
- #import <React/RCTViewManager.h>
12
-
13
- @interface RMFTileOverlayManager : RCTViewManager
14
-
15
- @end
16
-
17
- #endif /* RMFTileOverlayManager_h */
1
+ //
2
+ // RMFTileOverlayManager.h
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 12/15/21.
6
+ //
7
+
8
+ #ifndef RMFTileOverlayManager_h
9
+ #define RMFTileOverlayManager_h
10
+
11
+ #import <React/RCTViewManager.h>
12
+
13
+ @interface RMFTileOverlayManager : RCTViewManager
14
+
15
+ @end
16
+
17
+ #endif /* RMFTileOverlayManager_h */
@@ -1,27 +1,27 @@
1
- //
2
- // RMFTileOverlayManager.m
3
- // react-native-map4d-map
4
- //
5
- // Created by Huy Dang on 12/15/21.
6
- //
7
-
8
- #import "RMFTileOverlayManager.h"
9
- #import "RMFTileOverlay.h"
10
- #import <React/RCTConvert+CoreLocation.h>
11
- #import <React/RCTBridge.h>
12
- #import <React/RCTUIManager.h>
13
-
14
- @implementation RMFTileOverlayManager
15
-
16
- RCT_EXPORT_MODULE(RMFTileOverlay)
17
-
18
- - (UIView *)view {
19
- RMFTileOverlay * overlay = [[RMFTileOverlay alloc] init];
20
- return overlay;
21
- }
22
-
23
- RCT_EXPORT_VIEW_PROPERTY(urlTemplate, NSString)
24
- RCT_EXPORT_VIEW_PROPERTY(zIndex, float)
25
- RCT_EXPORT_VIEW_PROPERTY(visible, BOOL)
26
-
27
- @end
1
+ //
2
+ // RMFTileOverlayManager.m
3
+ // react-native-map4d-map
4
+ //
5
+ // Created by Huy Dang on 12/15/21.
6
+ //
7
+
8
+ #import "RMFTileOverlayManager.h"
9
+ #import "RMFTileOverlay.h"
10
+ #import <React/RCTConvert+CoreLocation.h>
11
+ #import <React/RCTBridge.h>
12
+ #import <React/RCTUIManager.h>
13
+
14
+ @implementation RMFTileOverlayManager
15
+
16
+ RCT_EXPORT_MODULE(RMFTileOverlay)
17
+
18
+ - (UIView *)view {
19
+ RMFTileOverlay * overlay = [[RMFTileOverlay alloc] init];
20
+ return overlay;
21
+ }
22
+
23
+ RCT_EXPORT_VIEW_PROPERTY(urlTemplate, NSString)
24
+ RCT_EXPORT_VIEW_PROPERTY(zIndex, float)
25
+ RCT_EXPORT_VIEW_PROPERTY(visible, BOOL)
26
+
27
+ @end
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MFBanDoSo = void 0;
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ var _MFMapView = require("./MFMapView");
11
+
12
+ var _GeojsonStyleUtils = require("./internal/GeojsonStyleUtils");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ const FilterStylePropType = _propTypes.default.shape({
17
+ kind: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
18
+ kind_detail: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)])
19
+ });
20
+
21
+ const DrawLinePropType = _propTypes.default.shape({
22
+ color: _propTypes.default.string,
23
+ width: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.array])
24
+ });
25
+
26
+ const DrawFillPropType = _propTypes.default.shape({
27
+ color: _propTypes.default.string
28
+ });
29
+
30
+ const DrawSymbolPropType = _propTypes.default.shape({
31
+ icon_image: _propTypes.default.string,
32
+ icon_index: _propTypes.default.number,
33
+ icon_color: _propTypes.default.string,
34
+ use_direct_icon_url: _propTypes.default.bool
35
+ });
36
+
37
+ const CategoryStylePropType = _propTypes.default.shape({
38
+ line: _propTypes.default.arrayOf(_propTypes.default.shape({
39
+ layer: _propTypes.default.string,
40
+ filter: FilterStylePropType,
41
+ draw: DrawLinePropType
42
+ })),
43
+ fill: _propTypes.default.arrayOf(_propTypes.default.shape({
44
+ layer: _propTypes.default.string,
45
+ filter: FilterStylePropType,
46
+ draw: DrawFillPropType
47
+ })),
48
+ symbol: _propTypes.default.arrayOf(_propTypes.default.shape({
49
+ layer: _propTypes.default.string,
50
+ filter: FilterStylePropType,
51
+ draw: DrawSymbolPropType
52
+ }))
53
+ });
54
+
55
+ const CategoryItemPropType = _propTypes.default.shape({
56
+ key: _propTypes.default.string,
57
+ title: _propTypes.default.string,
58
+ group: _propTypes.default.string,
59
+ order: _propTypes.default.number,
60
+ checked: _propTypes.default.bool,
61
+ style: CategoryStylePropType
62
+ });
63
+
64
+ class MFBanDoSo extends _MFMapView.MFMapView {
65
+ constructor(props) {
66
+ super(props);
67
+ this._appliedGeojsonStyle = null;
68
+ }
69
+
70
+ componentDidMount() {
71
+ this._syncGeojsonStyle();
72
+ }
73
+
74
+ componentDidUpdate(prevProps, prevState) {
75
+ const mapReadyChanged = prevState.isReady !== this.state.isReady;
76
+ const mapStyleChanged = prevProps.mapStyle !== this.props.mapStyle;
77
+ const sourceUrlChanged = prevProps.sourceUrl !== this.props.sourceUrl;
78
+ const itemsChanged = (0, _GeojsonStyleUtils.createCategoryItemsSignature)(prevProps.items) !== (0, _GeojsonStyleUtils.createCategoryItemsSignature)(this.props.items);
79
+
80
+ if (mapReadyChanged || mapStyleChanged || sourceUrlChanged || itemsChanged) {
81
+ this._syncGeojsonStyle();
82
+ }
83
+ }
84
+
85
+ _syncGeojsonStyle() {
86
+ if (!this.state.isReady) {
87
+ return;
88
+ }
89
+
90
+ const items = this.props.items || [];
91
+ const geojsonStyle = (0, _GeojsonStyleUtils.buildGeojsonStyle)(this.props.mapStyle, this.props.sourceUrl, items);
92
+
93
+ if (!geojsonStyle || geojsonStyle === this._appliedGeojsonStyle) {
94
+ return;
95
+ }
96
+
97
+ this._appliedGeojsonStyle = geojsonStyle;
98
+
99
+ this._runCommand('setMapStyle', [geojsonStyle]);
100
+ }
101
+
102
+ }
103
+
104
+ exports.MFBanDoSo = MFBanDoSo;
105
+ MFBanDoSo.propTypes = { ..._MFMapView.MFMapView.propTypes,
106
+ items: _propTypes.default.arrayOf(CategoryItemPropType),
107
+ sourceUrl: _propTypes.default.string.isRequired
108
+ };
109
+ //# sourceMappingURL=MFBanDoSo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FilterStylePropType","PropTypes","shape","kind","oneOfType","string","arrayOf","kind_detail","DrawLinePropType","color","width","number","array","DrawFillPropType","DrawSymbolPropType","icon_image","icon_index","icon_color","use_direct_icon_url","bool","CategoryStylePropType","line","layer","filter","draw","fill","symbol","CategoryItemPropType","key","title","group","order","checked","style","MFBanDoSo","MFMapView","constructor","props","_appliedGeojsonStyle","componentDidMount","_syncGeojsonStyle","componentDidUpdate","prevProps","prevState","mapReadyChanged","isReady","state","mapStyleChanged","mapStyle","sourceUrlChanged","sourceUrl","itemsChanged","createCategoryItemsSignature","items","geojsonStyle","buildGeojsonStyle","_runCommand","propTypes","isRequired"],"sources":["MFBanDoSo.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport { MFMapView } from './MFMapView';\r\nimport {\r\n buildGeojsonStyle,\r\n createCategoryItemsSignature,\r\n} from './internal/GeojsonStyleUtils';\r\n\r\nconst FilterStylePropType = PropTypes.shape({\r\n kind: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.arrayOf(PropTypes.string),\r\n ]),\r\n kind_detail: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.arrayOf(PropTypes.string),\r\n ]),\r\n});\r\n\r\nconst DrawLinePropType = PropTypes.shape({\r\n color: PropTypes.string,\r\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\r\n});\r\n\r\nconst DrawFillPropType = PropTypes.shape({\r\n color: PropTypes.string,\r\n});\r\n\r\nconst DrawSymbolPropType = PropTypes.shape({\r\n icon_image: PropTypes.string,\r\n icon_index: PropTypes.number,\r\n icon_color: PropTypes.string,\r\n use_direct_icon_url: PropTypes.bool,\r\n});\r\n\r\nconst CategoryStylePropType = PropTypes.shape({\r\n line: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n layer: PropTypes.string,\r\n filter: FilterStylePropType,\r\n draw: DrawLinePropType,\r\n })\r\n ),\r\n fill: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n layer: PropTypes.string,\r\n filter: FilterStylePropType,\r\n draw: DrawFillPropType,\r\n })\r\n ),\r\n symbol: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n layer: PropTypes.string,\r\n filter: FilterStylePropType,\r\n draw: DrawSymbolPropType,\r\n })\r\n ),\r\n});\r\n\r\nconst CategoryItemPropType = PropTypes.shape({\r\n key: PropTypes.string,\r\n title: PropTypes.string,\r\n group: PropTypes.string,\r\n order: PropTypes.number,\r\n checked: PropTypes.bool,\r\n style: CategoryStylePropType,\r\n});\r\n\r\nclass MFBanDoSo extends MFMapView {\r\n constructor(props) {\r\n super(props);\r\n this._appliedGeojsonStyle = null;\r\n }\r\n\r\n componentDidMount() {\r\n this._syncGeojsonStyle();\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const mapReadyChanged = prevState.isReady !== this.state.isReady;\r\n const mapStyleChanged = prevProps.mapStyle !== this.props.mapStyle;\r\n const sourceUrlChanged = prevProps.sourceUrl !== this.props.sourceUrl;\r\n const itemsChanged =\r\n createCategoryItemsSignature(prevProps.items) !==\r\n createCategoryItemsSignature(this.props.items);\r\n\r\n if (\r\n mapReadyChanged ||\r\n mapStyleChanged ||\r\n sourceUrlChanged ||\r\n itemsChanged\r\n ) {\r\n this._syncGeojsonStyle();\r\n }\r\n }\r\n\r\n _syncGeojsonStyle() {\r\n if (!this.state.isReady) {\r\n return;\r\n }\r\n\r\n const items = this.props.items || [];\r\n\r\n const geojsonStyle = buildGeojsonStyle(\r\n this.props.mapStyle,\r\n this.props.sourceUrl,\r\n items\r\n );\r\n\r\n if (!geojsonStyle || geojsonStyle === this._appliedGeojsonStyle) {\r\n return;\r\n }\r\n\r\n this._appliedGeojsonStyle = geojsonStyle;\r\n this._runCommand('setMapStyle', [geojsonStyle]);\r\n }\r\n}\r\n\r\nMFBanDoSo.propTypes = {\r\n ...MFMapView.propTypes,\r\n items: PropTypes.arrayOf(CategoryItemPropType),\r\n sourceUrl: PropTypes.string.isRequired,\r\n};\r\n\r\nexport { MFBanDoSo };\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAKA,MAAMA,mBAAmB,GAAGC,kBAAA,CAAUC,KAAV,CAAgB;EAC1CC,IAAI,EAAEF,kBAAA,CAAUG,SAAV,CAAoB,CACxBH,kBAAA,CAAUI,MADc,EAExBJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUI,MAA5B,CAFwB,CAApB,CADoC;EAK1CE,WAAW,EAAEN,kBAAA,CAAUG,SAAV,CAAoB,CAC/BH,kBAAA,CAAUI,MADqB,EAE/BJ,kBAAA,CAAUK,OAAV,CAAkBL,kBAAA,CAAUI,MAA5B,CAF+B,CAApB;AAL6B,CAAhB,CAA5B;;AAWA,MAAMG,gBAAgB,GAAGP,kBAAA,CAAUC,KAAV,CAAgB;EACvCO,KAAK,EAAER,kBAAA,CAAUI,MADsB;EAEvCK,KAAK,EAAET,kBAAA,CAAUG,SAAV,CAAoB,CAACH,kBAAA,CAAUU,MAAX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D;IACD;;IAED,KAAKA,oBAAL,GAA4BgB,YAA5B;;IACA,KAAKE,WAAL,CAAiB,aAAjB,EAAgC,CAACF,YAAD,CAAhC;EACD;;AA/C+B;;;AAkDlCpB,SAAS,CAACuB,SAAV,GAAsB,EACpB,GAAGtB,oBAAA,CAAUsB,SADO;EAEpBJ,KAAK,EAAEpD,kBAAA,CAAUK,OAAV,CAAkBqB,oBAAlB,CAFa;EAGpBuB,SAAS,EAAEjD,kBAAA,CAAUI,MAAV,CAAiBqD;AAHR,CAAtB"}
@@ -21,69 +21,69 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
21
21
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
22
22
  const propTypes = { ...viewPropTypes,
23
23
 
24
- /**
25
- * The name of the building.
24
+ /**
25
+ * The name of the building.
26
26
  */
27
27
  name: _propTypes.default.string,
28
28
 
29
- /**
30
- * The position of the building
29
+ /**
30
+ * The position of the building
31
31
  */
32
32
  coordinate: _propTypes.default.shape({
33
- /**
34
- * Position for the building.
33
+ /**
34
+ * Position for the building.
35
35
  */
36
36
  latitude: _propTypes.default.number.isRequired,
37
37
  longitude: _propTypes.default.number.isRequired
38
38
  }),
39
39
 
40
- /**
41
- * The model URL for the building.
40
+ /**
41
+ * The model URL for the building.
42
42
  */
43
43
  modelUrl: _propTypes.default.string,
44
44
 
45
- /**
46
- * The texture URL for the building.
45
+ /**
46
+ * The texture URL for the building.
47
47
  */
48
48
  textureUrl: _propTypes.default.string,
49
49
 
50
- /**
51
- * The scale of the building.
50
+ /**
51
+ * The scale of the building.
52
52
  */
53
53
  scale: _propTypes.default.number,
54
54
 
55
- /**
56
- * The bearing of the building.
55
+ /**
56
+ * The bearing of the building.
57
57
  */
58
58
  bearing: _propTypes.default.number,
59
59
 
60
- /**
61
- * The elevation of the building.
60
+ /**
61
+ * The elevation of the building.
62
62
  */
63
63
  elevation: _propTypes.default.number,
64
64
 
65
- /**
66
- * Is the building selectable by the user ?
65
+ /**
66
+ * Is the building selectable by the user ?
67
67
  */
68
68
  selected: _propTypes.default.bool,
69
69
 
70
- /**
71
- * touchable
70
+ /**
71
+ * touchable
72
72
  */
73
73
  touchable: _propTypes.default.bool,
74
74
 
75
- /**
76
- * visible
75
+ /**
76
+ * visible
77
77
  */
78
78
  visible: _propTypes.default.bool,
79
79
 
80
- /**
81
- * userData
80
+ /**
81
+ * userData
82
82
  */
83
83
  userData: _propTypes.default.object,
84
84
 
85
- /**
86
- * Callback that is called when the user presses on the building
85
+ /**
86
+ * Callback that is called when the user presses on the building
87
87
  */
88
88
  onPress: _propTypes.default.func
89
89
  };
@@ -1 +1 @@
1
- {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","name","PropTypes","string","coordinate","shape","latitude","number","isRequired","longitude","modelUrl","textureUrl","scale","bearing","elevation","selected","bool","touchable","visible","userData","object","onPress","func","MFBuilding","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","building","setName","_runCommand","setScale","setBearing","setElevation","setSelected","setTouchable","setVisible","setUserData","_getHandle","findNodeHandle","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","RMFBuilding","requireNativeComponent"],"sources":["MFBuilding.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The name of the building.\n */\n name: PropTypes.string,\n\n /**\n * The position of the building\n */\n coordinate: PropTypes.shape({\n /**\n * Position for the building.\n */\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n /**\n * The model URL for the building.\n */\n modelUrl: PropTypes.string,\n\n /**\n * The texture URL for the building.\n */\n textureUrl: PropTypes.string,\n\n /**\n * The scale of the building.\n */\n scale: PropTypes.number,\n\n /**\n * The bearing of the building.\n */\n bearing: PropTypes.number,\n\n /**\n * The elevation of the building.\n */\n elevation: PropTypes.number,\n\n /**\n * Is the building selectable by the user ?\n */\n selected: PropTypes.bool,\n\n /**\n * touchable\n */\n touchable: PropTypes.bool,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the building\n */\n onPress: PropTypes.func,\n};\n\n\nclass MFBuilding extends React.Component {\n constructor(props) {\n super(props);\n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.building = ref;\n }\n\n setName(name) {\n this._runCommand(\"setName\", [name])\n }\n\n setScale(scale) {\n this._runCommand(\"setScale\", [scale])\n }\n\n setBearing(bearing) {\n this._runCommand(\"setBearing\", [bearing])\n }\n\n setElevation(elevation) {\n this._runCommand(\"setElevation\", [elevation])\n }\n\n setSelected(selected) {\n this._runCommand(\"setSelected\", [selected])\n }\n\n setTouchable(touchable) {\n this._runCommand(\"setTouchable\", [touchable])\n }\n\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n\n _getHandle() {\n return findNodeHandle(this.building);\n }\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n\n case 'ios':\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFBuilding\";\n\n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n\n // RN >= 0.58\n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n\n _mapManagerCommand(name) {\n return NativeModules[`RMFBuilding`][name];\n }\n\n render() {\n return <RMFBuilding\n {...this.props}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n}\n\nMFBuilding.propTypes = propTypes;\n\nvar RMFBuilding = requireNativeComponent(`RMFBuilding`, MFBuilding);\n\nexport { MFBuilding }"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAOA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,IAAI,EAAEC,kBAAA,CAAUC,MANA;;EAQhB;AACF;AACA;EACEC,UAAU,EAAEF,kBAAA,CAAUG,KAAV,CAAgB;IAC1B;AACJ;AACA;IACIC,QAAQ,EAAEJ,kBAAA,CAAUK,MAAV,CAAiBC,UAJD;IAK1BC,SAAS,EAAEP,kBAAA,CAAUK,MAAV,CAAiBC;EALF,CAAhB,CAXI;;EAmBhB;AACF;AACA;EACEE,QAAQ,EAAER,kBAAA,CAAUC,MAtBJ;;EAwBhB;AACF;AACA;EACEQ,UAAU,EAAET,kBAAA,CAAUC,MA3BN;;EA6BhB;AACF;AACA;EACES,KAAK,EAAEV,kBAAA,CAAUK,MAhCD;;EAkChB;AACF;AACA;EACEM,OAAO,EAAEX,kBAAA,CAAUK,MArCH;;EAuChB;AACF;AACA;EACEO,SAAS,EAAEZ,kBAAA,CAAUK,MA1CL;;EA4ChB;AACF;AACA;EACEQ,QAAQ,EAAEb,kBAAA,CAAUc,IA/CJ;;EAiDhB;AACF;AACA;EACEC,SAAS,EAAEf,kBAAA,CAAUc,IApDL;;EAsDhB;AACF;AACA;EACEE,OAAO,EAAEhB,kBAAA,CAAUc,IAzDH;;EA2DhB;AACF;AACA;EACEG,QAAQ,EAACjB,kBAAA,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,SAAX,GAAuBA,SAAvB;AAEA,IAAI0D,WAAW,GAAG,IAAAC,mCAAA,EAAwB,aAAxB,EAAsCpC,UAAtC,CAAlB"}
1
+ {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","name","PropTypes","string","coordinate","shape","latitude","number","isRequired","longitude","modelUrl","textureUrl","scale","bearing","elevation","selected","bool","touchable","visible","userData","object","onPress","func","MFBuilding","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","building","setName","_runCommand","setScale","setBearing","setElevation","setSelected","setTouchable","setVisible","setUserData","_getHandle","findNodeHandle","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","RMFBuilding","requireNativeComponent"],"sources":["MFBuilding.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n NativeModules,\r\n findNodeHandle\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The name of the building.\r\n */\r\n name: PropTypes.string,\r\n\r\n /**\r\n * The position of the building\r\n */\r\n coordinate: PropTypes.shape({\r\n /**\r\n * Position for the building.\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n /**\r\n * The model URL for the building.\r\n */\r\n modelUrl: PropTypes.string,\r\n\r\n /**\r\n * The texture URL for the building.\r\n */\r\n textureUrl: PropTypes.string,\r\n\r\n /**\r\n * The scale of the building.\r\n */\r\n scale: PropTypes.number,\r\n\r\n /**\r\n * The bearing of the building.\r\n */\r\n bearing: PropTypes.number,\r\n\r\n /**\r\n * The elevation of the building.\r\n */\r\n elevation: PropTypes.number,\r\n\r\n /**\r\n * Is the building selectable by the user ?\r\n */\r\n selected: PropTypes.bool,\r\n\r\n /**\r\n * touchable\r\n */\r\n touchable: PropTypes.bool,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the building\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFBuilding extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.building = ref;\r\n }\r\n\r\n setName(name) {\r\n this._runCommand(\"setName\", [name])\r\n }\r\n\r\n setScale(scale) {\r\n this._runCommand(\"setScale\", [scale])\r\n }\r\n\r\n setBearing(bearing) {\r\n this._runCommand(\"setBearing\", [bearing])\r\n }\r\n\r\n setElevation(elevation) {\r\n this._runCommand(\"setElevation\", [elevation])\r\n }\r\n\r\n setSelected(selected) {\r\n this._runCommand(\"setSelected\", [selected])\r\n }\r\n\r\n setTouchable(touchable) {\r\n this._runCommand(\"setTouchable\", [touchable])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.building);\r\n }\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android':\r\n NativeModules.UIManager.dispatchViewManagerCommand(\r\n this._getHandle(),\r\n this._uiManagerCommand(name),\r\n args\r\n );\r\n break;\r\n\r\n case 'ios':\r\n this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const UIManager = NativeModules.UIManager;\r\n const componentName = \"RMFBuilding\";\r\n\r\n if (!UIManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n return UIManager[componentName].Commands[name];\r\n }\r\n\r\n // RN >= 0.58\r\n return UIManager.getViewManagerConfig(componentName).Commands[name];\r\n }\r\n\r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFBuilding`][name];\r\n }\r\n\r\n render() {\r\n return <RMFBuilding\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFBuilding.propTypes = propTypes;\r\n\r\nvar RMFBuilding = requireNativeComponent(`RMFBuilding`, MFBuilding);\r\n\r\nexport { MFBuilding }"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAOA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,IAAI,EAAEC,kBAAA,CAAUC,MANA;;EAQhB;AACF;AACA;EACEC,UAAU,EAAEF,kBAAA,CAAUG,KAAV,CAAgB;IAC1B;AACJ;AACA;IACIC,QAAQ,EAAEJ,kBAAA,CAAUK,MAAV,CAAiBC,UAJD;IAK1BC,SAAS,EAAEP,kBAAA,CAAUK,MAAV,CAAiBC;EALF,CAAhB,CAXI;;EAmBhB;AACF;AACA;EACEE,QAAQ,EAAER,kBAAA,CAAUC,MAtBJ;;EAwBhB;AACF;AACA;EACEQ,UAAU,EAAET,kBAAA,CAAUC,MA3BN;;EA6BhB;AACF;AACA;EACES,KAAK,EAAEV,kBAAA,CAAUK,MAhCD;;EAkChB;AACF;AACA;EACEM,OAAO,EAAEX,kBAAA,CAAUK,MArCH;;EAuChB;AACF;AACA;EACEO,SAAS,EAAEZ,kBAAA,CAAUK,MA1CL;;EA4ChB;AACF;AACA;EACEQ,QAAQ,EAAEb,kBAAA,CAAUc,IA/CJ;;EAiDhB;AACF;AAC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