react-native-maps 1.21.0-alpha.5 → 1.21.0-alpha.51
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/android/build.gradle +32 -8
- package/android/generated/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +199 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +71 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNMapsSpecs-generated.cpp +68 -0
- package/android/generated/jni/RNMapsSpecs.h +31 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +25 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +27 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +896 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +765 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.cpp +146 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.h +1047 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +264 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +20 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +65 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.h +65 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +345 -0
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +2 -1
- package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +26 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +25 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +24 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +43 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +25 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +15 -2
- package/android/src/main/java/com/rnmaps/maps/MapView.java +153 -86
- package/ios/AirGoogleMaps/AIRGoogleMap.h +8 -2
- package/ios/AirGoogleMaps/AIRGoogleMap.m +243 -55
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
- package/ios/AirGoogleMaps/AIRGoogleMapCoordinate.h +13 -0
- package/ios/AirGoogleMaps/AIRGoogleMapCoordinate.m +10 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.h +7 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +30 -119
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +2 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +347 -243
- package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapOverlay.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.h +5 -4
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +32 -2
- package/ios/AirGoogleMaps/AIRGoogleMapPolygonManager.m +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +3 -2
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +2 -3
- package/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m +2 -2
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.h +3 -0
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +18 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +629 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +25 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +25 -0
- package/ios/AirMaps/AIRMap.h +8 -5
- package/ios/AirMaps/AIRMap.m +292 -141
- package/ios/AirMaps/AIRMapManager.m +12 -21
- package/ios/AirMaps/AIRMapMarker.h +1 -0
- package/ios/AirMaps/AIRMapMarker.m +165 -103
- package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
- package/ios/AirMaps/RCTConvert+AirMap.h +4 -0
- package/ios/AirMaps/RCTConvert+AirMap.m +2 -0
- package/ios/AirMaps/RNMapsAirModule.h +4 -1
- package/ios/AirMaps/RNMapsAirModule.mm +42 -172
- package/ios/AirMaps/RNMapsAirModuleDelegate.h +24 -0
- package/ios/AirMaps/RNMapsHostVewDelegate.h +17 -0
- package/ios/AirMaps/RNMapsMapView.h +6 -3
- package/ios/AirMaps/RNMapsMapView.mm +346 -332
- package/ios/AirMaps/RNMapsMarkerView.h +24 -0
- package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +21 -0
- package/ios/AirMaps/UIView +AirMap.m +20 -0
- package/ios/AirMaps/UIView+AirMap.h +11 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +60 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +25 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +27 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +896 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +765 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +146 -0
- package/ios/generated/RNMapsSpecs/Props.h +1047 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +549 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +134 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +20 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +65 -0
- package/ios/generated/RNMapsSpecs/States.cpp +16 -0
- package/ios/generated/RNMapsSpecs/States.h +65 -0
- package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
- package/ios/generated/RNMapsSpecsJSI.h +264 -0
- package/lib/MapMarker.d.ts +15 -2
- package/lib/MapMarker.js +53 -9
- package/lib/MapMarkerNativeComponent.js +0 -2
- package/lib/MapOverlay.d.ts +1 -1
- package/lib/MapOverlay.js +2 -8
- package/lib/MapView.d.ts +5 -22
- package/lib/MapView.js +59 -73
- package/lib/{FabricMapView.d.ts → createFabricMap.d.ts} +7 -6
- package/lib/createFabricMap.js +175 -0
- package/lib/decorateMapComponent.js +18 -0
- package/lib/specs/NativeAirMapsModule.d.ts +2 -2
- package/lib/specs/NativeComponentGoogleMapView.d.ts +713 -0
- package/lib/specs/NativeComponentGoogleMapView.js +21 -0
- package/lib/specs/NativeComponentGooglePolygon.d.ts +75 -0
- package/lib/specs/NativeComponentGooglePolygon.js +9 -0
- package/lib/specs/NativeComponentMapView.d.ts +21 -45
- package/lib/specs/NativeComponentMapView.js +1 -3
- package/lib/specs/NativeComponentMarker.d.ts +258 -0
- package/lib/specs/NativeComponentMarker.js +21 -0
- package/package.json +12 -6
- package/react-native-maps.podspec +2 -1
- package/lib/FabricMapView.js +0 -175
package/android/build.gradle
CHANGED
|
@@ -12,7 +12,7 @@ buildscript {
|
|
|
12
12
|
mavenCentral()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath("com.android.tools.build:gradle:
|
|
15
|
+
classpath("com.android.tools.build:gradle:8.6.0")
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -45,32 +45,56 @@ android {
|
|
|
45
45
|
namespace "com.rnmaps.maps"
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
if (rootProject.hasProperty("ndkPath")) {
|
|
49
|
+
ndkPath rootProject.ext.ndkPath
|
|
50
|
+
}
|
|
51
|
+
if (rootProject.hasProperty("ndkVersion")) {
|
|
52
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
compileSdk safeExtGet('compileSdkVersion', 35)
|
|
49
56
|
|
|
50
57
|
defaultConfig {
|
|
51
58
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
52
59
|
targetSdkVersion safeExtGet('targetSdkVersion', 34)
|
|
53
60
|
|
|
54
61
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
62
|
+
|
|
63
|
+
ndk {
|
|
64
|
+
abiFilters(*reactNativeArchitectures())
|
|
65
|
+
}
|
|
55
66
|
}
|
|
56
67
|
packagingOptions {
|
|
57
68
|
excludes = [
|
|
58
69
|
"META-INF",
|
|
59
70
|
"META-INF/**",
|
|
60
|
-
|
|
71
|
+
"**/libreact_render*.so",
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
sourceSets {
|
|
76
|
+
main {
|
|
77
|
+
if (isNewArchitectureEnabled()) {
|
|
78
|
+
java.srcDirs += [
|
|
79
|
+
"generated/java",
|
|
80
|
+
"generated/jni"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
61
84
|
}
|
|
62
85
|
}
|
|
63
86
|
|
|
87
|
+
def reactNativeArchitectures() {
|
|
88
|
+
def value = project.getProperties().get("reactNativeArchitectures")
|
|
89
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
90
|
+
}
|
|
91
|
+
|
|
64
92
|
repositories {
|
|
65
93
|
mavenLocal()
|
|
66
94
|
mavenCentral()
|
|
67
95
|
maven {
|
|
68
96
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
69
|
-
url "$
|
|
70
|
-
}
|
|
71
|
-
maven {
|
|
72
|
-
// Android JSC is installed from npm
|
|
73
|
-
url "$rootDir/../node_modules/jsc-android/dist"
|
|
97
|
+
url "$projectDir/../node_modules/react-native/android"
|
|
74
98
|
}
|
|
75
99
|
google()
|
|
76
100
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
+
*
|
|
10
|
+
* @nolint
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
package com.facebook.fbreact.specs;
|
|
14
|
+
|
|
15
|
+
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
+
import com.facebook.react.bridge.Promise;
|
|
17
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
21
|
+
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
22
|
+
import javax.annotation.Nonnull;
|
|
23
|
+
|
|
24
|
+
public abstract class NativeAirMapsModuleSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
25
|
+
public static final String NAME = "RNMapsAirModule";
|
|
26
|
+
|
|
27
|
+
public NativeAirMapsModuleSpec(ReactApplicationContext reactContext) {
|
|
28
|
+
super(reactContext);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@Override
|
|
32
|
+
public @Nonnull String getName() {
|
|
33
|
+
return NAME;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@ReactMethod
|
|
37
|
+
@DoNotStrip
|
|
38
|
+
public abstract void getCamera(double tag, Promise promise);
|
|
39
|
+
|
|
40
|
+
@ReactMethod
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
public abstract void getMarkersFrames(double tag, boolean onlyVisible, Promise promise);
|
|
43
|
+
|
|
44
|
+
@ReactMethod
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
public abstract void getMapBoundaries(double tag, Promise promise);
|
|
47
|
+
|
|
48
|
+
@ReactMethod
|
|
49
|
+
@DoNotStrip
|
|
50
|
+
public abstract void takeSnapshot(double tag, String config, Promise promise);
|
|
51
|
+
|
|
52
|
+
@ReactMethod
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
public abstract void getAddressFromCoordinates(double tag, ReadableMap coordinate, Promise promise);
|
|
55
|
+
|
|
56
|
+
@ReactMethod
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
public abstract void getPointForCoordinate(double tag, ReadableMap coordinate, Promise promise);
|
|
59
|
+
|
|
60
|
+
@ReactMethod
|
|
61
|
+
@DoNotStrip
|
|
62
|
+
public abstract void getCoordinateForPoint(double tag, ReadableMap point, Promise promise);
|
|
63
|
+
}
|
package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
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: GeneratePropsJavaDelegate.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import com.facebook.react.bridge.ColorPropConverter;
|
|
15
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
16
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
17
|
+
import com.facebook.react.uimanager.BaseViewManagerDelegate;
|
|
18
|
+
import com.facebook.react.uimanager.BaseViewManagerInterface;
|
|
19
|
+
|
|
20
|
+
public class RNMapsMapViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & RNMapsMapViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
|
21
|
+
public RNMapsMapViewManagerDelegate(U viewManager) {
|
|
22
|
+
super(viewManager);
|
|
23
|
+
}
|
|
24
|
+
@Override
|
|
25
|
+
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
26
|
+
switch (propName) {
|
|
27
|
+
case "cacheEnabled":
|
|
28
|
+
mViewManager.setCacheEnabled(view, value == null ? false : (boolean) value);
|
|
29
|
+
break;
|
|
30
|
+
case "camera":
|
|
31
|
+
mViewManager.setCamera(view, (ReadableMap) value);
|
|
32
|
+
break;
|
|
33
|
+
case "compassOffset":
|
|
34
|
+
mViewManager.setCompassOffset(view, (ReadableMap) value);
|
|
35
|
+
break;
|
|
36
|
+
case "followsUserLocation":
|
|
37
|
+
mViewManager.setFollowsUserLocation(view, value == null ? false : (boolean) value);
|
|
38
|
+
break;
|
|
39
|
+
case "poiClickEnabled":
|
|
40
|
+
mViewManager.setPoiClickEnabled(view, value == null ? false : (boolean) value);
|
|
41
|
+
break;
|
|
42
|
+
case "initialCamera":
|
|
43
|
+
mViewManager.setInitialCamera(view, (ReadableMap) value);
|
|
44
|
+
break;
|
|
45
|
+
case "initialRegion":
|
|
46
|
+
mViewManager.setInitialRegion(view, (ReadableMap) value);
|
|
47
|
+
break;
|
|
48
|
+
case "kmlSrc":
|
|
49
|
+
mViewManager.setKmlSrc(view, value == null ? null : (String) value);
|
|
50
|
+
break;
|
|
51
|
+
case "legalLabelInsets":
|
|
52
|
+
mViewManager.setLegalLabelInsets(view, (ReadableMap) value);
|
|
53
|
+
break;
|
|
54
|
+
case "liteMode":
|
|
55
|
+
mViewManager.setLiteMode(view, value == null ? false : (boolean) value);
|
|
56
|
+
break;
|
|
57
|
+
case "googleMapId":
|
|
58
|
+
mViewManager.setGoogleMapId(view, value == null ? null : (String) value);
|
|
59
|
+
break;
|
|
60
|
+
case "googleRenderer":
|
|
61
|
+
mViewManager.setGoogleRenderer(view, (String) value);
|
|
62
|
+
break;
|
|
63
|
+
case "loadingBackgroundColor":
|
|
64
|
+
mViewManager.setLoadingBackgroundColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
65
|
+
break;
|
|
66
|
+
case "loadingEnabled":
|
|
67
|
+
mViewManager.setLoadingEnabled(view, value == null ? false : (boolean) value);
|
|
68
|
+
break;
|
|
69
|
+
case "loadingIndicatorColor":
|
|
70
|
+
mViewManager.setLoadingIndicatorColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
71
|
+
break;
|
|
72
|
+
case "mapPadding":
|
|
73
|
+
mViewManager.setMapPadding(view, (ReadableMap) value);
|
|
74
|
+
break;
|
|
75
|
+
case "mapType":
|
|
76
|
+
mViewManager.setMapType(view, (String) value);
|
|
77
|
+
break;
|
|
78
|
+
case "maxDelta":
|
|
79
|
+
mViewManager.setMaxDelta(view, value == null ? 0f : ((Double) value).doubleValue());
|
|
80
|
+
break;
|
|
81
|
+
case "maxZoom":
|
|
82
|
+
mViewManager.setMaxZoom(view, value == null ? 0f : ((Double) value).floatValue());
|
|
83
|
+
break;
|
|
84
|
+
case "minDelta":
|
|
85
|
+
mViewManager.setMinDelta(view, value == null ? 0f : ((Double) value).doubleValue());
|
|
86
|
+
break;
|
|
87
|
+
case "minZoom":
|
|
88
|
+
mViewManager.setMinZoom(view, value == null ? 0f : ((Double) value).floatValue());
|
|
89
|
+
break;
|
|
90
|
+
case "moveOnMarkerPress":
|
|
91
|
+
mViewManager.setMoveOnMarkerPress(view, value == null ? true : (boolean) value);
|
|
92
|
+
break;
|
|
93
|
+
case "handlePanDrag":
|
|
94
|
+
mViewManager.setHandlePanDrag(view, value == null ? false : (boolean) value);
|
|
95
|
+
break;
|
|
96
|
+
case "paddingAdjustmentBehavior":
|
|
97
|
+
mViewManager.setPaddingAdjustmentBehavior(view, (String) value);
|
|
98
|
+
break;
|
|
99
|
+
case "pitchEnabled":
|
|
100
|
+
mViewManager.setPitchEnabled(view, value == null ? true : (boolean) value);
|
|
101
|
+
break;
|
|
102
|
+
case "region":
|
|
103
|
+
mViewManager.setRegion(view, (ReadableMap) value);
|
|
104
|
+
break;
|
|
105
|
+
case "rotateEnabled":
|
|
106
|
+
mViewManager.setRotateEnabled(view, value == null ? true : (boolean) value);
|
|
107
|
+
break;
|
|
108
|
+
case "scrollDuringRotateOrZoomEnabled":
|
|
109
|
+
mViewManager.setScrollDuringRotateOrZoomEnabled(view, value == null ? true : (boolean) value);
|
|
110
|
+
break;
|
|
111
|
+
case "scrollEnabled":
|
|
112
|
+
mViewManager.setScrollEnabled(view, value == null ? true : (boolean) value);
|
|
113
|
+
break;
|
|
114
|
+
case "showsBuildings":
|
|
115
|
+
mViewManager.setShowsBuildings(view, value == null ? true : (boolean) value);
|
|
116
|
+
break;
|
|
117
|
+
case "showsCompass":
|
|
118
|
+
mViewManager.setShowsCompass(view, value == null ? true : (boolean) value);
|
|
119
|
+
break;
|
|
120
|
+
case "showsIndoorLevelPicker":
|
|
121
|
+
mViewManager.setShowsIndoorLevelPicker(view, value == null ? false : (boolean) value);
|
|
122
|
+
break;
|
|
123
|
+
case "showsIndoors":
|
|
124
|
+
mViewManager.setShowsIndoors(view, value == null ? true : (boolean) value);
|
|
125
|
+
break;
|
|
126
|
+
case "showsMyLocationButton":
|
|
127
|
+
mViewManager.setShowsMyLocationButton(view, value == null ? true : (boolean) value);
|
|
128
|
+
break;
|
|
129
|
+
case "showsScale":
|
|
130
|
+
mViewManager.setShowsScale(view, value == null ? false : (boolean) value);
|
|
131
|
+
break;
|
|
132
|
+
case "showsUserLocation":
|
|
133
|
+
mViewManager.setShowsUserLocation(view, value == null ? false : (boolean) value);
|
|
134
|
+
break;
|
|
135
|
+
case "tintColor":
|
|
136
|
+
mViewManager.setTintColor(view, ColorPropConverter.getColor(value, view.getContext()));
|
|
137
|
+
break;
|
|
138
|
+
case "toolbarEnabled":
|
|
139
|
+
mViewManager.setToolbarEnabled(view, value == null ? true : (boolean) value);
|
|
140
|
+
break;
|
|
141
|
+
case "userInterfaceStyle":
|
|
142
|
+
mViewManager.setUserInterfaceStyle(view, (String) value);
|
|
143
|
+
break;
|
|
144
|
+
case "userLocationAnnotationTitle":
|
|
145
|
+
mViewManager.setUserLocationAnnotationTitle(view, value == null ? null : (String) value);
|
|
146
|
+
break;
|
|
147
|
+
case "userLocationCalloutEnabled":
|
|
148
|
+
mViewManager.setUserLocationCalloutEnabled(view, value == null ? false : (boolean) value);
|
|
149
|
+
break;
|
|
150
|
+
case "userLocationFastestInterval":
|
|
151
|
+
mViewManager.setUserLocationFastestInterval(view, value == null ? 5000 : ((Double) value).intValue());
|
|
152
|
+
break;
|
|
153
|
+
case "userLocationPriority":
|
|
154
|
+
mViewManager.setUserLocationPriority(view, (String) value);
|
|
155
|
+
break;
|
|
156
|
+
case "userLocationUpdateInterval":
|
|
157
|
+
mViewManager.setUserLocationUpdateInterval(view, value == null ? 5000 : ((Double) value).intValue());
|
|
158
|
+
break;
|
|
159
|
+
case "zoomControlEnabled":
|
|
160
|
+
mViewManager.setZoomControlEnabled(view, value == null ? true : (boolean) value);
|
|
161
|
+
break;
|
|
162
|
+
case "zoomEnabled":
|
|
163
|
+
mViewManager.setZoomEnabled(view, value == null ? true : (boolean) value);
|
|
164
|
+
break;
|
|
165
|
+
case "zoomTapEnabled":
|
|
166
|
+
mViewManager.setZoomTapEnabled(view, value == null ? true : (boolean) value);
|
|
167
|
+
break;
|
|
168
|
+
case "cameraZoomRange":
|
|
169
|
+
mViewManager.setCameraZoomRange(view, (ReadableMap) value);
|
|
170
|
+
break;
|
|
171
|
+
default:
|
|
172
|
+
super.setProperty(view, propName, value);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@Override
|
|
177
|
+
public void receiveCommand(T view, String commandName, @Nullable ReadableArray args) {
|
|
178
|
+
switch (commandName) {
|
|
179
|
+
case "animateToRegion":
|
|
180
|
+
mViewManager.animateToRegion(view, args.getString(0), args.getInt(1));
|
|
181
|
+
break;
|
|
182
|
+
case "setCamera":
|
|
183
|
+
mViewManager.setCamera(view, args.getString(0));
|
|
184
|
+
break;
|
|
185
|
+
case "animateCamera":
|
|
186
|
+
mViewManager.animateCamera(view, args.getString(0), args.getInt(1));
|
|
187
|
+
break;
|
|
188
|
+
case "fitToElements":
|
|
189
|
+
mViewManager.fitToElements(view, args.getString(0), args.getBoolean(1));
|
|
190
|
+
break;
|
|
191
|
+
case "fitToSuppliedMarkers":
|
|
192
|
+
mViewManager.fitToSuppliedMarkers(view, args.getString(0), args.getString(1), args.getBoolean(2));
|
|
193
|
+
break;
|
|
194
|
+
case "fitToCoordinates":
|
|
195
|
+
mViewManager.fitToCoordinates(view, args.getString(0), args.getString(1), args.getBoolean(2));
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
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: GeneratePropsJavaInterface.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
package com.facebook.react.viewmanagers;
|
|
11
|
+
|
|
12
|
+
import android.view.View;
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
15
|
+
|
|
16
|
+
public interface RNMapsMapViewManagerInterface<T extends View> {
|
|
17
|
+
void setCacheEnabled(T view, boolean value);
|
|
18
|
+
void setCamera(T view, @Nullable ReadableMap value);
|
|
19
|
+
void setCompassOffset(T view, @Nullable ReadableMap value);
|
|
20
|
+
void setFollowsUserLocation(T view, boolean value);
|
|
21
|
+
void setPoiClickEnabled(T view, boolean value);
|
|
22
|
+
void setInitialCamera(T view, @Nullable ReadableMap value);
|
|
23
|
+
void setInitialRegion(T view, @Nullable ReadableMap value);
|
|
24
|
+
void setKmlSrc(T view, @Nullable String value);
|
|
25
|
+
void setLegalLabelInsets(T view, @Nullable ReadableMap value);
|
|
26
|
+
void setLiteMode(T view, boolean value);
|
|
27
|
+
void setGoogleMapId(T view, @Nullable String value);
|
|
28
|
+
void setGoogleRenderer(T view, @Nullable String value);
|
|
29
|
+
void setLoadingBackgroundColor(T view, @Nullable Integer value);
|
|
30
|
+
void setLoadingEnabled(T view, boolean value);
|
|
31
|
+
void setLoadingIndicatorColor(T view, @Nullable Integer value);
|
|
32
|
+
void setMapPadding(T view, @Nullable ReadableMap value);
|
|
33
|
+
void setMapType(T view, @Nullable String value);
|
|
34
|
+
void setMaxDelta(T view, double value);
|
|
35
|
+
void setMaxZoom(T view, float value);
|
|
36
|
+
void setMinDelta(T view, double value);
|
|
37
|
+
void setMinZoom(T view, float value);
|
|
38
|
+
void setMoveOnMarkerPress(T view, boolean value);
|
|
39
|
+
void setHandlePanDrag(T view, boolean value);
|
|
40
|
+
void setPaddingAdjustmentBehavior(T view, @Nullable String value);
|
|
41
|
+
void setPitchEnabled(T view, boolean value);
|
|
42
|
+
void setRegion(T view, @Nullable ReadableMap value);
|
|
43
|
+
void setRotateEnabled(T view, boolean value);
|
|
44
|
+
void setScrollDuringRotateOrZoomEnabled(T view, boolean value);
|
|
45
|
+
void setScrollEnabled(T view, boolean value);
|
|
46
|
+
void setShowsBuildings(T view, boolean value);
|
|
47
|
+
void setShowsCompass(T view, boolean value);
|
|
48
|
+
void setShowsIndoorLevelPicker(T view, boolean value);
|
|
49
|
+
void setShowsIndoors(T view, boolean value);
|
|
50
|
+
void setShowsMyLocationButton(T view, boolean value);
|
|
51
|
+
void setShowsScale(T view, boolean value);
|
|
52
|
+
void setShowsUserLocation(T view, boolean value);
|
|
53
|
+
void setTintColor(T view, @Nullable Integer value);
|
|
54
|
+
void setToolbarEnabled(T view, boolean value);
|
|
55
|
+
void setUserInterfaceStyle(T view, @Nullable String value);
|
|
56
|
+
void setUserLocationAnnotationTitle(T view, @Nullable String value);
|
|
57
|
+
void setUserLocationCalloutEnabled(T view, boolean value);
|
|
58
|
+
void setUserLocationFastestInterval(T view, int value);
|
|
59
|
+
void setUserLocationPriority(T view, @Nullable String value);
|
|
60
|
+
void setUserLocationUpdateInterval(T view, int value);
|
|
61
|
+
void setZoomControlEnabled(T view, boolean value);
|
|
62
|
+
void setZoomEnabled(T view, boolean value);
|
|
63
|
+
void setZoomTapEnabled(T view, boolean value);
|
|
64
|
+
void setCameraZoomRange(T view, @Nullable ReadableMap value);
|
|
65
|
+
void animateToRegion(T view, String regionJSON, int duration);
|
|
66
|
+
void setCamera(T view, String cameraJSON);
|
|
67
|
+
void animateCamera(T view, String cameraJSON, int duration);
|
|
68
|
+
void fitToElements(T view, String edgePaddingJSON, boolean animated);
|
|
69
|
+
void fitToSuppliedMarkers(T view, String markersJSON, String edgePaddingJSON, boolean animated);
|
|
70
|
+
void fitToCoordinates(T view, String coordinatesJSON, String edgePaddingJSON, boolean animated);
|
|
71
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
#
|
|
3
|
+
# This source code is licensed under the MIT license found in the
|
|
4
|
+
# LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
6
|
+
cmake_minimum_required(VERSION 3.13)
|
|
7
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
+
|
|
9
|
+
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNMapsSpecs/*.cpp)
|
|
10
|
+
|
|
11
|
+
add_library(
|
|
12
|
+
react_codegen_RNMapsSpecs
|
|
13
|
+
OBJECT
|
|
14
|
+
${react_codegen_SRCS}
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
target_include_directories(react_codegen_RNMapsSpecs PUBLIC . react/renderer/components/RNMapsSpecs)
|
|
18
|
+
|
|
19
|
+
target_link_libraries(
|
|
20
|
+
react_codegen_RNMapsSpecs
|
|
21
|
+
fbjni
|
|
22
|
+
jsi
|
|
23
|
+
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
+
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
+
reactnative
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
target_compile_options(
|
|
29
|
+
react_codegen_RNMapsSpecs
|
|
30
|
+
PRIVATE
|
|
31
|
+
-DLOG_TAG=\"ReactNative\"
|
|
32
|
+
-fexceptions
|
|
33
|
+
-frtti
|
|
34
|
+
-std=c++20
|
|
35
|
+
-Wall
|
|
36
|
+
)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "RNMapsSpecs.h"
|
|
12
|
+
|
|
13
|
+
namespace facebook::react {
|
|
14
|
+
|
|
15
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCamera(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
+
static jmethodID cachedMethodId = nullptr;
|
|
17
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getCamera", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
+
static jmethodID cachedMethodId = nullptr;
|
|
22
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getMarkersFrames", "(DZLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
26
|
+
static jmethodID cachedMethodId = nullptr;
|
|
27
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getMapBoundaries", "(DLcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
31
|
+
static jmethodID cachedMethodId = nullptr;
|
|
32
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "takeSnapshot", "(DLjava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
36
|
+
static jmethodID cachedMethodId = nullptr;
|
|
37
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getAddressFromCoordinates", "(DLcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
41
|
+
static jmethodID cachedMethodId = nullptr;
|
|
42
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getPointForCoordinate", "(DLcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static facebook::jsi::Value __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
46
|
+
static jmethodID cachedMethodId = nullptr;
|
|
47
|
+
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getCoordinateForPoint", "(DLcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
NativeAirMapsModuleSpecJSI::NativeAirMapsModuleSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
51
|
+
: JavaTurboModule(params) {
|
|
52
|
+
methodMap_["getCamera"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getCamera};
|
|
53
|
+
methodMap_["getMarkersFrames"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getMarkersFrames};
|
|
54
|
+
methodMap_["getMapBoundaries"] = MethodMetadata {1, __hostFunction_NativeAirMapsModuleSpecJSI_getMapBoundaries};
|
|
55
|
+
methodMap_["takeSnapshot"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_takeSnapshot};
|
|
56
|
+
methodMap_["getAddressFromCoordinates"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getAddressFromCoordinates};
|
|
57
|
+
methodMap_["getPointForCoordinate"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getPointForCoordinate};
|
|
58
|
+
methodMap_["getCoordinateForPoint"] = MethodMetadata {2, __hostFunction_NativeAirMapsModuleSpecJSI_getCoordinateForPoint};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
std::shared_ptr<TurboModule> RNMapsSpecs_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
62
|
+
if (moduleName == "RNMapsAirModule") {
|
|
63
|
+
return std::make_shared<NativeAirMapsModuleSpecJSI>(params);
|
|
64
|
+
}
|
|
65
|
+
return nullptr;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
+
#include <ReactCommon/TurboModule.h>
|
|
15
|
+
#include <jsi/jsi.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* JNI C++ class for module 'NativeAirMapsModule'
|
|
21
|
+
*/
|
|
22
|
+
class JSI_EXPORT NativeAirMapsModuleSpecJSI : public JavaTurboModule {
|
|
23
|
+
public:
|
|
24
|
+
NativeAirMapsModuleSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
JSI_EXPORT
|
|
29
|
+
std::shared_ptr<TurboModule> RNMapsSpecs_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
+
|
|
31
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include "ComponentDescriptors.h"
|
|
12
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
|
|
17
|
+
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
|
|
18
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsGoogleMapViewComponentDescriptor>());
|
|
20
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsGooglePolygonComponentDescriptor>());
|
|
21
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsMapViewComponentDescriptor>());
|
|
22
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsMarkerComponentDescriptor>());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include "ShadowNodes.h"
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
+
|
|
17
|
+
namespace facebook::react {
|
|
18
|
+
|
|
19
|
+
using RNMapsGoogleMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsGoogleMapViewShadowNode>;
|
|
20
|
+
using RNMapsGooglePolygonComponentDescriptor = ConcreteComponentDescriptor<RNMapsGooglePolygonShadowNode>;
|
|
21
|
+
using RNMapsMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsMapViewShadowNode>;
|
|
22
|
+
using RNMapsMarkerComponentDescriptor = ConcreteComponentDescriptor<RNMapsMarkerShadowNode>;
|
|
23
|
+
|
|
24
|
+
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
|
|
25
|
+
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
26
|
+
|
|
27
|
+
} // namespace facebook::react
|