react-native-maps 1.21.0-alpha.98 → 1.21.0
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 +9 -4
- package/android/build.gradle +65 -72
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/RCTAppDependencyProvider.h +25 -0
- package/android/src/main/RCTAppDependencyProvider.mm +55 -0
- package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
- package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
- package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
- package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
- package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
- package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
- package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
- package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
- package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
- package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
- package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
- package/android/src/main/jni/CMakeLists.txt +36 -0
- package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
- package/android/src/main/jni/RNMapsSpecs.h +31 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
- package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
- package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
- package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
- package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
- package/ios/AirMaps/AIRMap.h +8 -9
- package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
- package/ios/AirMaps/AIRMapManager.m +8 -19
- package/ios/AirMaps/AIRMapMarker.m +57 -44
- package/ios/AirMaps/AIRMapOverlay.m +2 -2
- package/ios/AirMaps/AIRMapWMSTile.m +8 -8
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
- package/ios/AirMaps/RNMapsAirModule.h +2 -3
- package/ios/AirMaps/RNMapsAirModule.mm +14 -0
- package/ios/AirMaps/RNMapsDefines.h +1 -0
- package/ios/AirMaps/RNMapsMapView.h +5 -2
- package/ios/AirMaps/RNMapsMapView.mm +16 -6
- package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
- package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
- package/ios/AirMaps/module.modulemap +6 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
- package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
- package/ios/generated/RNMapsSpecs/Props.h +1224 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
- package/ios/generated/RNMapsSpecs/States.cpp +16 -0
- package/ios/generated/RNMapsSpecs/States.h +113 -0
- package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
- package/ios/generated/RNMapsSpecsJSI.h +268 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/ios/generated/module.modulemap +15 -0
- package/package.json +30 -25
- package/react-native-google-maps.podspec +27 -0
- package/react-native-maps-generated.podspec +31 -0
- package/react-native-maps.podspec +52 -46
- package/react-native.config.js +16 -0
- package/src/AnimatedRegion.ts +169 -0
- package/src/Geojson.tsx +541 -0
- package/src/MapCallout.tsx +77 -0
- package/src/MapCalloutSubview.tsx +64 -0
- package/src/MapCircle.tsx +162 -0
- package/src/MapHeatmap.tsx +125 -0
- package/src/MapLocalTile.tsx +60 -0
- package/src/MapMarker.tsx +531 -0
- package/src/MapMarkerNativeComponent.ts +51 -0
- package/src/MapOverlay.tsx +178 -0
- package/src/MapPolygon.tsx +188 -0
- package/src/MapPolygon.types.ts +25 -0
- package/src/MapPolyline.tsx +215 -0
- package/src/MapUrlTile.tsx +169 -0
- package/src/MapView.tsx +1230 -0
- package/src/MapView.types.ts +212 -0
- package/src/MapView.web.ts +2 -0
- package/src/MapViewNativeComponent.ts +86 -0
- package/src/MapWMSTile.tsx +148 -0
- package/src/ProviderConstants.ts +2 -0
- package/src/createFabricMap.tsx +253 -0
- package/src/decorateMapComponent.ts +227 -0
- package/src/fixImageProp.ts +17 -0
- package/src/index.ts +52 -0
- package/src/sharedTypes.ts +101 -0
- package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
- package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
- package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
- package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
- package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
- package/src/specs/NativeComponentUrlTile.ts +128 -0
- package/src/specs/NativeComponentWMSTile.ts +107 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
- package/lib/AnimatedRegion.d.ts +0 -19
- package/lib/AnimatedRegion.js +0 -134
- package/lib/Geojson.d.ts +0 -204
- package/lib/Geojson.js +0 -166
- package/lib/MapCallout.d.ts +0 -40
- package/lib/MapCallout.js +0 -51
- package/lib/MapCalloutSubview.d.ts +0 -34
- package/lib/MapCalloutSubview.js +0 -48
- package/lib/MapCircle.d.ts +0 -117
- package/lib/MapCircle.js +0 -53
- package/lib/MapHeatmap.d.ts +0 -78
- package/lib/MapHeatmap.js +0 -59
- package/lib/MapLocalTile.d.ts +0 -35
- package/lib/MapLocalTile.js +0 -44
- package/lib/MapMarker.d.ts +0 -322
- package/lib/MapMarker.js +0 -158
- package/lib/MapMarkerNativeComponent.d.ts +0 -15
- package/lib/MapMarkerNativeComponent.js +0 -15
- package/lib/MapOverlay.d.ts +0 -88
- package/lib/MapOverlay.js +0 -65
- package/lib/MapPolygon.d.ts +0 -140
- package/lib/MapPolygon.js +0 -53
- package/lib/MapPolygon.types.d.ts +0 -18
- package/lib/MapPolygon.types.js +0 -2
- package/lib/MapPolyline.d.ts +0 -156
- package/lib/MapPolyline.js +0 -53
- package/lib/MapUrlTile.d.ts +0 -134
- package/lib/MapUrlTile.js +0 -44
- package/lib/MapView.d.ts +0 -703
- package/lib/MapView.js +0 -427
- package/lib/MapView.types.d.ts +0 -161
- package/lib/MapView.types.js +0 -2
- package/lib/MapView.web.d.ts +0 -1
- package/lib/MapView.web.js +0 -9
- package/lib/MapViewNativeComponent.d.ts +0 -18
- package/lib/MapViewNativeComponent.js +0 -19
- package/lib/MapWMSTile.d.ts +0 -116
- package/lib/MapWMSTile.js +0 -44
- package/lib/ProviderConstants.d.ts +0 -2
- package/lib/ProviderConstants.js +0 -5
- package/lib/createFabricMap.d.ts +0 -24
- package/lib/createFabricMap.js +0 -188
- package/lib/decorateMapComponent.d.ts +0 -36
- package/lib/decorateMapComponent.js +0 -120
- package/lib/fixImageProp.d.ts +0 -4
- package/lib/fixImageProp.js +0 -16
- package/lib/index.d.ts +0 -38
- package/lib/index.js +0 -81
- package/lib/sharedTypes.d.ts +0 -81
- package/lib/sharedTypes.js +0 -2
- package/lib/sharedTypesInternal.js +0 -2
- package/lib/specs/NativeAirMapsModule.d.ts +0 -31
- package/lib/specs/NativeAirMapsModule.js +0 -4
- package/lib/specs/NativeComponentCallout.d.ts +0 -46
- package/lib/specs/NativeComponentCallout.js +0 -9
- package/lib/specs/NativeComponentCircle.d.ts +0 -74
- package/lib/specs/NativeComponentCircle.js +0 -7
- package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
- package/lib/specs/NativeComponentGoogleMapView.js +0 -22
- package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
- package/lib/specs/NativeComponentGooglePolygon.js +0 -7
- package/lib/specs/NativeComponentMapView.d.ts +0 -847
- package/lib/specs/NativeComponentMapView.js +0 -20
- package/lib/specs/NativeComponentMarker.d.ts +0 -258
- package/lib/specs/NativeComponentMarker.js +0 -19
- package/lib/specs/NativeComponentOverlay.d.ts +0 -67
- package/lib/specs/NativeComponentOverlay.js +0 -7
- package/lib/specs/NativeComponentPolyline.d.ts +0 -101
- package/lib/specs/NativeComponentPolyline.js +0 -7
- /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
- /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
- /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
- /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
- /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
- /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
- /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateComponentHObjCpp.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <React/RCTDefines.h>
|
|
12
|
+
#import <React/RCTLog.h>
|
|
13
|
+
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@protocol RCTRNMapsGoogleMapViewViewProtocol <NSObject>
|
|
17
|
+
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
|
|
18
|
+
- (void)setCamera:(NSString *)cameraJSON;
|
|
19
|
+
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
|
|
20
|
+
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
21
|
+
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
22
|
+
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
23
|
+
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
RCT_EXTERN inline void RCTRNMapsGoogleMapViewHandleCommand(
|
|
27
|
+
id<RCTRNMapsGoogleMapViewViewProtocol> componentView,
|
|
28
|
+
NSString const *commandName,
|
|
29
|
+
NSArray const *args)
|
|
30
|
+
{
|
|
31
|
+
if ([commandName isEqualToString:@"animateToRegion"]) {
|
|
32
|
+
#if RCT_DEBUG
|
|
33
|
+
if ([args count] != 2) {
|
|
34
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
NSObject *arg0 = args[0];
|
|
40
|
+
#if RCT_DEBUG
|
|
41
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
#endif
|
|
45
|
+
NSString * regionJSON = (NSString *)arg0;
|
|
46
|
+
|
|
47
|
+
NSObject *arg1 = args[1];
|
|
48
|
+
#if RCT_DEBUG
|
|
49
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
NSInteger duration = [(NSNumber *)arg1 intValue];
|
|
54
|
+
|
|
55
|
+
[componentView animateToRegion:regionJSON duration:duration];
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if ([commandName isEqualToString:@"setCamera"]) {
|
|
60
|
+
#if RCT_DEBUG
|
|
61
|
+
if ([args count] != 1) {
|
|
62
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
#endif
|
|
66
|
+
|
|
67
|
+
NSObject *arg0 = args[0];
|
|
68
|
+
#if RCT_DEBUG
|
|
69
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
#endif
|
|
73
|
+
NSString * cameraJSON = (NSString *)arg0;
|
|
74
|
+
|
|
75
|
+
[componentView setCamera:cameraJSON];
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if ([commandName isEqualToString:@"animateCamera"]) {
|
|
80
|
+
#if RCT_DEBUG
|
|
81
|
+
if ([args count] != 2) {
|
|
82
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
#endif
|
|
86
|
+
|
|
87
|
+
NSObject *arg0 = args[0];
|
|
88
|
+
#if RCT_DEBUG
|
|
89
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
#endif
|
|
93
|
+
NSString * cameraJSON = (NSString *)arg0;
|
|
94
|
+
|
|
95
|
+
NSObject *arg1 = args[1];
|
|
96
|
+
#if RCT_DEBUG
|
|
97
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"2nd")) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
#endif
|
|
101
|
+
NSInteger duration = [(NSNumber *)arg1 intValue];
|
|
102
|
+
|
|
103
|
+
[componentView animateCamera:cameraJSON duration:duration];
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if ([commandName isEqualToString:@"fitToElements"]) {
|
|
108
|
+
#if RCT_DEBUG
|
|
109
|
+
if ([args count] != 2) {
|
|
110
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 2);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
#endif
|
|
114
|
+
|
|
115
|
+
NSObject *arg0 = args[0];
|
|
116
|
+
#if RCT_DEBUG
|
|
117
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
#endif
|
|
121
|
+
NSString * edgePaddingJSON = (NSString *)arg0;
|
|
122
|
+
|
|
123
|
+
NSObject *arg1 = args[1];
|
|
124
|
+
#if RCT_DEBUG
|
|
125
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"2nd")) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
#endif
|
|
129
|
+
BOOL animated = [(NSNumber *)arg1 boolValue];
|
|
130
|
+
|
|
131
|
+
[componentView fitToElements:edgePaddingJSON animated:animated];
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
|
|
136
|
+
#if RCT_DEBUG
|
|
137
|
+
if ([args count] != 3) {
|
|
138
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
NSObject *arg0 = args[0];
|
|
144
|
+
#if RCT_DEBUG
|
|
145
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
#endif
|
|
149
|
+
NSString * markersJSON = (NSString *)arg0;
|
|
150
|
+
|
|
151
|
+
NSObject *arg1 = args[1];
|
|
152
|
+
#if RCT_DEBUG
|
|
153
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
#endif
|
|
157
|
+
NSString * edgePaddingJSON = (NSString *)arg1;
|
|
158
|
+
|
|
159
|
+
NSObject *arg2 = args[2];
|
|
160
|
+
#if RCT_DEBUG
|
|
161
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
#endif
|
|
165
|
+
BOOL animated = [(NSNumber *)arg2 boolValue];
|
|
166
|
+
|
|
167
|
+
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if ([commandName isEqualToString:@"fitToCoordinates"]) {
|
|
172
|
+
#if RCT_DEBUG
|
|
173
|
+
if ([args count] != 3) {
|
|
174
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 3);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
#endif
|
|
178
|
+
|
|
179
|
+
NSObject *arg0 = args[0];
|
|
180
|
+
#if RCT_DEBUG
|
|
181
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
#endif
|
|
185
|
+
NSString * coordinatesJSON = (NSString *)arg0;
|
|
186
|
+
|
|
187
|
+
NSObject *arg1 = args[1];
|
|
188
|
+
#if RCT_DEBUG
|
|
189
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsGoogleMapView", commandName, @"2nd")) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
#endif
|
|
193
|
+
NSString * edgePaddingJSON = (NSString *)arg1;
|
|
194
|
+
|
|
195
|
+
NSObject *arg2 = args[2];
|
|
196
|
+
#if RCT_DEBUG
|
|
197
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsGoogleMapView", commandName, @"3rd")) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
#endif
|
|
201
|
+
BOOL animated = [(NSNumber *)arg2 boolValue];
|
|
202
|
+
|
|
203
|
+
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
|
|
208
|
+
#if RCT_DEBUG
|
|
209
|
+
if ([args count] != 1) {
|
|
210
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsGoogleMapView", commandName, (int)[args count], 1);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
#endif
|
|
214
|
+
|
|
215
|
+
NSObject *arg0 = args[0];
|
|
216
|
+
#if RCT_DEBUG
|
|
217
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsGoogleMapView", commandName, @"1st")) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
#endif
|
|
221
|
+
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
|
|
222
|
+
|
|
223
|
+
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
#if RCT_DEBUG
|
|
228
|
+
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsGoogleMapView", commandName);
|
|
229
|
+
#endif
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@protocol RCTRNMapsGooglePolygonViewProtocol <NSObject>
|
|
233
|
+
|
|
234
|
+
@end
|
|
235
|
+
|
|
236
|
+
@protocol RCTRNMapsMapViewViewProtocol <NSObject>
|
|
237
|
+
- (void)animateToRegion:(NSString *)regionJSON duration:(NSInteger)duration;
|
|
238
|
+
- (void)setCamera:(NSString *)cameraJSON;
|
|
239
|
+
- (void)animateCamera:(NSString *)cameraJSON duration:(NSInteger)duration;
|
|
240
|
+
- (void)fitToElements:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
241
|
+
- (void)fitToSuppliedMarkers:(NSString *)markersJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
242
|
+
- (void)fitToCoordinates:(NSString *)coordinatesJSON edgePaddingJSON:(NSString *)edgePaddingJSON animated:(BOOL)animated;
|
|
243
|
+
- (void)setIndoorActiveLevelIndex:(NSInteger)activeLevelIndex;
|
|
244
|
+
@end
|
|
245
|
+
|
|
246
|
+
RCT_EXTERN inline void RCTRNMapsMapViewHandleCommand(
|
|
247
|
+
id<RCTRNMapsMapViewViewProtocol> componentView,
|
|
248
|
+
NSString const *commandName,
|
|
249
|
+
NSArray const *args)
|
|
250
|
+
{
|
|
251
|
+
if ([commandName isEqualToString:@"animateToRegion"]) {
|
|
252
|
+
#if RCT_DEBUG
|
|
253
|
+
if ([args count] != 2) {
|
|
254
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
#endif
|
|
258
|
+
|
|
259
|
+
NSObject *arg0 = args[0];
|
|
260
|
+
#if RCT_DEBUG
|
|
261
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
#endif
|
|
265
|
+
NSString * regionJSON = (NSString *)arg0;
|
|
266
|
+
|
|
267
|
+
NSObject *arg1 = args[1];
|
|
268
|
+
#if RCT_DEBUG
|
|
269
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
#endif
|
|
273
|
+
NSInteger duration = [(NSNumber *)arg1 intValue];
|
|
274
|
+
|
|
275
|
+
[componentView animateToRegion:regionJSON duration:duration];
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if ([commandName isEqualToString:@"setCamera"]) {
|
|
280
|
+
#if RCT_DEBUG
|
|
281
|
+
if ([args count] != 1) {
|
|
282
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
#endif
|
|
286
|
+
|
|
287
|
+
NSObject *arg0 = args[0];
|
|
288
|
+
#if RCT_DEBUG
|
|
289
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
#endif
|
|
293
|
+
NSString * cameraJSON = (NSString *)arg0;
|
|
294
|
+
|
|
295
|
+
[componentView setCamera:cameraJSON];
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if ([commandName isEqualToString:@"animateCamera"]) {
|
|
300
|
+
#if RCT_DEBUG
|
|
301
|
+
if ([args count] != 2) {
|
|
302
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
#endif
|
|
306
|
+
|
|
307
|
+
NSObject *arg0 = args[0];
|
|
308
|
+
#if RCT_DEBUG
|
|
309
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
#endif
|
|
313
|
+
NSString * cameraJSON = (NSString *)arg0;
|
|
314
|
+
|
|
315
|
+
NSObject *arg1 = args[1];
|
|
316
|
+
#if RCT_DEBUG
|
|
317
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"2nd")) {
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
#endif
|
|
321
|
+
NSInteger duration = [(NSNumber *)arg1 intValue];
|
|
322
|
+
|
|
323
|
+
[componentView animateCamera:cameraJSON duration:duration];
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if ([commandName isEqualToString:@"fitToElements"]) {
|
|
328
|
+
#if RCT_DEBUG
|
|
329
|
+
if ([args count] != 2) {
|
|
330
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 2);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
#endif
|
|
334
|
+
|
|
335
|
+
NSObject *arg0 = args[0];
|
|
336
|
+
#if RCT_DEBUG
|
|
337
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
#endif
|
|
341
|
+
NSString * edgePaddingJSON = (NSString *)arg0;
|
|
342
|
+
|
|
343
|
+
NSObject *arg1 = args[1];
|
|
344
|
+
#if RCT_DEBUG
|
|
345
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"2nd")) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
#endif
|
|
349
|
+
BOOL animated = [(NSNumber *)arg1 boolValue];
|
|
350
|
+
|
|
351
|
+
[componentView fitToElements:edgePaddingJSON animated:animated];
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if ([commandName isEqualToString:@"fitToSuppliedMarkers"]) {
|
|
356
|
+
#if RCT_DEBUG
|
|
357
|
+
if ([args count] != 3) {
|
|
358
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
#endif
|
|
362
|
+
|
|
363
|
+
NSObject *arg0 = args[0];
|
|
364
|
+
#if RCT_DEBUG
|
|
365
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
#endif
|
|
369
|
+
NSString * markersJSON = (NSString *)arg0;
|
|
370
|
+
|
|
371
|
+
NSObject *arg1 = args[1];
|
|
372
|
+
#if RCT_DEBUG
|
|
373
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
#endif
|
|
377
|
+
NSString * edgePaddingJSON = (NSString *)arg1;
|
|
378
|
+
|
|
379
|
+
NSObject *arg2 = args[2];
|
|
380
|
+
#if RCT_DEBUG
|
|
381
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
#endif
|
|
385
|
+
BOOL animated = [(NSNumber *)arg2 boolValue];
|
|
386
|
+
|
|
387
|
+
[componentView fitToSuppliedMarkers:markersJSON edgePaddingJSON:edgePaddingJSON animated:animated];
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if ([commandName isEqualToString:@"fitToCoordinates"]) {
|
|
392
|
+
#if RCT_DEBUG
|
|
393
|
+
if ([args count] != 3) {
|
|
394
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 3);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
#endif
|
|
398
|
+
|
|
399
|
+
NSObject *arg0 = args[0];
|
|
400
|
+
#if RCT_DEBUG
|
|
401
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNMapsMapView", commandName, @"1st")) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
#endif
|
|
405
|
+
NSString * coordinatesJSON = (NSString *)arg0;
|
|
406
|
+
|
|
407
|
+
NSObject *arg1 = args[1];
|
|
408
|
+
#if RCT_DEBUG
|
|
409
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"RNMapsMapView", commandName, @"2nd")) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
#endif
|
|
413
|
+
NSString * edgePaddingJSON = (NSString *)arg1;
|
|
414
|
+
|
|
415
|
+
NSObject *arg2 = args[2];
|
|
416
|
+
#if RCT_DEBUG
|
|
417
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"boolean", @"RNMapsMapView", commandName, @"3rd")) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
#endif
|
|
421
|
+
BOOL animated = [(NSNumber *)arg2 boolValue];
|
|
422
|
+
|
|
423
|
+
[componentView fitToCoordinates:coordinatesJSON edgePaddingJSON:edgePaddingJSON animated:animated];
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if ([commandName isEqualToString:@"setIndoorActiveLevelIndex"]) {
|
|
428
|
+
#if RCT_DEBUG
|
|
429
|
+
if ([args count] != 1) {
|
|
430
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMapView", commandName, (int)[args count], 1);
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
#endif
|
|
434
|
+
|
|
435
|
+
NSObject *arg0 = args[0];
|
|
436
|
+
#if RCT_DEBUG
|
|
437
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"RNMapsMapView", commandName, @"1st")) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
#endif
|
|
441
|
+
NSInteger activeLevelIndex = [(NSNumber *)arg0 intValue];
|
|
442
|
+
|
|
443
|
+
[componentView setIndoorActiveLevelIndex:activeLevelIndex];
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
#if RCT_DEBUG
|
|
448
|
+
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMapView", commandName);
|
|
449
|
+
#endif
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
@protocol RCTRNMapsMarkerViewProtocol <NSObject>
|
|
453
|
+
- (void)animateToCoordinates:(double)latitude longitude:(double)longitude duration:(NSInteger)duration;
|
|
454
|
+
- (void)setCoordinates:(double)latitude longitude:(double)longitude;
|
|
455
|
+
- (void)showCallout;
|
|
456
|
+
- (void)hideCallout;
|
|
457
|
+
- (void)redrawCallout;
|
|
458
|
+
- (void)redraw;
|
|
459
|
+
@end
|
|
460
|
+
|
|
461
|
+
RCT_EXTERN inline void RCTRNMapsMarkerHandleCommand(
|
|
462
|
+
id<RCTRNMapsMarkerViewProtocol> componentView,
|
|
463
|
+
NSString const *commandName,
|
|
464
|
+
NSArray const *args)
|
|
465
|
+
{
|
|
466
|
+
if ([commandName isEqualToString:@"animateToCoordinates"]) {
|
|
467
|
+
#if RCT_DEBUG
|
|
468
|
+
if ([args count] != 3) {
|
|
469
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 3);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
#endif
|
|
473
|
+
|
|
474
|
+
NSObject *arg0 = args[0];
|
|
475
|
+
#if RCT_DEBUG
|
|
476
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
#endif
|
|
480
|
+
double latitude = [(NSNumber *)arg0 doubleValue];
|
|
481
|
+
|
|
482
|
+
NSObject *arg1 = args[1];
|
|
483
|
+
#if RCT_DEBUG
|
|
484
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
#endif
|
|
488
|
+
double longitude = [(NSNumber *)arg1 doubleValue];
|
|
489
|
+
|
|
490
|
+
NSObject *arg2 = args[2];
|
|
491
|
+
#if RCT_DEBUG
|
|
492
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"number", @"RNMapsMarker", commandName, @"3rd")) {
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
#endif
|
|
496
|
+
NSInteger duration = [(NSNumber *)arg2 intValue];
|
|
497
|
+
|
|
498
|
+
[componentView animateToCoordinates:latitude longitude:longitude duration:duration];
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if ([commandName isEqualToString:@"setCoordinates"]) {
|
|
503
|
+
#if RCT_DEBUG
|
|
504
|
+
if ([args count] != 2) {
|
|
505
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 2);
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
#endif
|
|
509
|
+
|
|
510
|
+
NSObject *arg0 = args[0];
|
|
511
|
+
#if RCT_DEBUG
|
|
512
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"1st")) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
#endif
|
|
516
|
+
double latitude = [(NSNumber *)arg0 doubleValue];
|
|
517
|
+
|
|
518
|
+
NSObject *arg1 = args[1];
|
|
519
|
+
#if RCT_DEBUG
|
|
520
|
+
if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"double", @"RNMapsMarker", commandName, @"2nd")) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
#endif
|
|
524
|
+
double longitude = [(NSNumber *)arg1 doubleValue];
|
|
525
|
+
|
|
526
|
+
[componentView setCoordinates:latitude longitude:longitude];
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if ([commandName isEqualToString:@"showCallout"]) {
|
|
531
|
+
#if RCT_DEBUG
|
|
532
|
+
if ([args count] != 0) {
|
|
533
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
#endif
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
[componentView showCallout];
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if ([commandName isEqualToString:@"hideCallout"]) {
|
|
545
|
+
#if RCT_DEBUG
|
|
546
|
+
if ([args count] != 0) {
|
|
547
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
#endif
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
[componentView hideCallout];
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if ([commandName isEqualToString:@"redrawCallout"]) {
|
|
559
|
+
#if RCT_DEBUG
|
|
560
|
+
if ([args count] != 0) {
|
|
561
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
#endif
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
[componentView redrawCallout];
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
if ([commandName isEqualToString:@"redraw"]) {
|
|
573
|
+
#if RCT_DEBUG
|
|
574
|
+
if ([args count] != 0) {
|
|
575
|
+
RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNMapsMarker", commandName, (int)[args count], 0);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
#endif
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
[componentView redraw];
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
#if RCT_DEBUG
|
|
587
|
+
RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNMapsMarker", commandName);
|
|
588
|
+
#endif
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
+
*
|
|
9
|
+
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
+
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
+
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
#import "RNMapsSpecs.h"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@implementation NativeAirMapsModuleSpecBase
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
+
{
|
|
22
|
+
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
+
}
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
@implementation RCTCxxConvert (NativeAirMapsModule_LatLng)
|
|
27
|
+
+ (RCTManagedPointer *)JS_NativeAirMapsModule_LatLng:(id)json
|
|
28
|
+
{
|
|
29
|
+
return facebook::react::managedPointer<JS::NativeAirMapsModule::LatLng>(json);
|
|
30
|
+
}
|
|
31
|
+
@end
|
|
32
|
+
@implementation RCTCxxConvert (NativeAirMapsModule_Point)
|
|
33
|
+
+ (RCTManagedPointer *)JS_NativeAirMapsModule_Point:(id)json
|
|
34
|
+
{
|
|
35
|
+
return facebook::react::managedPointer<JS::NativeAirMapsModule::Point>(json);
|
|
36
|
+
}
|
|
37
|
+
@end
|
|
38
|
+
namespace facebook::react {
|
|
39
|
+
|
|
40
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCamera(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
41
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCamera", @selector(getCamera:resolve:reject:), args, count);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
45
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMarkersFrames", @selector(getMarkersFrames:onlyVisible:resolve:reject:), args, count);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
49
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMapBoundaries", @selector(getMapBoundaries:resolve:reject:), args, count);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
53
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "takeSnapshot", @selector(takeSnapshot:config:resolve:reject:), args, count);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
57
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getAddressFromCoordinates", @selector(getAddressFromCoordinates:coordinate:resolve:reject:), args, count);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
61
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getPointForCoordinate", @selector(getPointForCoordinate:coordinate:resolve:reject:), args, count);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
65
|
+
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getCoordinateForPoint", @selector(getCoordinateForPoint:point:resolve:reject:), args, count);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
NativeAirMapsModuleSpecJSI::NativeAirMapsModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
69
|
+
: ObjCTurboModule(params) {
|
|
70
|
+
|
|
71
|
+
methodMap_["getCamera"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getCamera};
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
methodMap_["getMarkersFrames"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames};
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
methodMap_["getMapBoundaries"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries};
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
methodMap_["takeSnapshot"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
methodMap_["getAddressFromCoordinates"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates};
|
|
84
|
+
setMethodArgConversionSelector(@"getAddressFromCoordinates", 1, @"JS_NativeAirMapsModule_LatLng:");
|
|
85
|
+
|
|
86
|
+
methodMap_["getPointForCoordinate"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate};
|
|
87
|
+
setMethodArgConversionSelector(@"getPointForCoordinate", 1, @"JS_NativeAirMapsModule_LatLng:");
|
|
88
|
+
|
|
89
|
+
methodMap_["getCoordinateForPoint"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint};
|
|
90
|
+
setMethodArgConversionSelector(@"getCoordinateForPoint", 1, @"JS_NativeAirMapsModule_Point:");
|
|
91
|
+
}
|
|
92
|
+
} // namespace facebook::react
|