react-native-maps 1.19.0 → 1.20.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/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +31 -13
- package/android/gradlew.bat +21 -16
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +5 -0
- package/android/src/main/java/com/rnmaps/maps/MapView.java +9 -1
- package/lib/MapView.d.ts +9 -0
- package/package.json +17 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
package/android/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
# Darwin, MinGW, and NonStop.
|
|
56
58
|
#
|
|
57
59
|
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
61
|
# within the Gradle project.
|
|
60
62
|
#
|
|
61
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -80,13 +82,12 @@ do
|
|
|
80
82
|
esac
|
|
81
83
|
done
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
APP_NAME="Gradle"
|
|
85
|
+
# This is normally unused
|
|
86
|
+
# shellcheck disable=SC2034
|
|
86
87
|
APP_BASE_NAME=${0##*/}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
+
' "$PWD" ) || exit
|
|
90
91
|
|
|
91
92
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
92
93
|
MAX_FD=maximum
|
|
@@ -133,22 +134,29 @@ location of your Java installation."
|
|
|
133
134
|
fi
|
|
134
135
|
else
|
|
135
136
|
JAVACMD=java
|
|
136
|
-
|
|
137
|
+
if ! command -v java >/dev/null 2>&1
|
|
138
|
+
then
|
|
139
|
+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
137
140
|
|
|
138
141
|
Please set the JAVA_HOME variable in your environment to match the
|
|
139
142
|
location of your Java installation."
|
|
143
|
+
fi
|
|
140
144
|
fi
|
|
141
145
|
|
|
142
146
|
# Increase the maximum file descriptors if we can.
|
|
143
147
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
144
148
|
case $MAX_FD in #(
|
|
145
149
|
max*)
|
|
150
|
+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
151
|
+
# shellcheck disable=SC2039,SC3045
|
|
146
152
|
MAX_FD=$( ulimit -H -n ) ||
|
|
147
153
|
warn "Could not query maximum file descriptor limit"
|
|
148
154
|
esac
|
|
149
155
|
case $MAX_FD in #(
|
|
150
156
|
'' | soft) :;; #(
|
|
151
157
|
*)
|
|
158
|
+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
159
|
+
# shellcheck disable=SC2039,SC3045
|
|
152
160
|
ulimit -n "$MAX_FD" ||
|
|
153
161
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
154
162
|
esac
|
|
@@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then
|
|
|
193
201
|
done
|
|
194
202
|
fi
|
|
195
203
|
|
|
196
|
-
|
|
197
|
-
#
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
#
|
|
204
|
+
|
|
205
|
+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
206
|
+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
207
|
+
|
|
208
|
+
# Collect all arguments for the java command:
|
|
209
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
210
|
+
# and any embedded shellness will be escaped.
|
|
211
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
212
|
+
# treated as '${Hostname}' itself on the command line.
|
|
201
213
|
|
|
202
214
|
set -- \
|
|
203
215
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
@@ -205,6 +217,12 @@ set -- \
|
|
|
205
217
|
org.gradle.wrapper.GradleWrapperMain \
|
|
206
218
|
"$@"
|
|
207
219
|
|
|
220
|
+
# Stop when "xargs" is not available.
|
|
221
|
+
if ! command -v xargs >/dev/null 2>&1
|
|
222
|
+
then
|
|
223
|
+
die "xargs is not available"
|
|
224
|
+
fi
|
|
225
|
+
|
|
208
226
|
# Use "xargs" to parse quoted args.
|
|
209
227
|
#
|
|
210
228
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
package/android/gradlew.bat
CHANGED
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
16
18
|
|
|
17
|
-
@if "%DEBUG%"
|
|
19
|
+
@if "%DEBUG%"=="" @echo off
|
|
18
20
|
@rem ##########################################################################
|
|
19
21
|
@rem
|
|
20
22
|
@rem Gradle startup script for Windows
|
|
@@ -25,7 +27,8 @@
|
|
|
25
27
|
if "%OS%"=="Windows_NT" setlocal
|
|
26
28
|
|
|
27
29
|
set DIRNAME=%~dp0
|
|
28
|
-
if "%DIRNAME%"
|
|
30
|
+
if "%DIRNAME%"=="" set DIRNAME=.
|
|
31
|
+
@rem This is normally unused
|
|
29
32
|
set APP_BASE_NAME=%~n0
|
|
30
33
|
set APP_HOME=%DIRNAME%
|
|
31
34
|
|
|
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|
|
40
43
|
|
|
41
44
|
set JAVA_EXE=java.exe
|
|
42
45
|
%JAVA_EXE% -version >NUL 2>&1
|
|
43
|
-
if
|
|
46
|
+
if %ERRORLEVEL% equ 0 goto execute
|
|
44
47
|
|
|
45
|
-
echo.
|
|
46
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
47
|
-
echo.
|
|
48
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
49
|
-
echo location of your Java installation.
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
+
echo. 1>&2
|
|
51
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
+
echo location of your Java installation. 1>&2
|
|
50
53
|
|
|
51
54
|
goto fail
|
|
52
55
|
|
|
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
56
59
|
|
|
57
60
|
if exist "%JAVA_EXE%" goto execute
|
|
58
61
|
|
|
59
|
-
echo.
|
|
60
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
61
|
-
echo.
|
|
62
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
63
|
-
echo location of your Java installation.
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
+
echo. 1>&2
|
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
+
echo location of your Java installation. 1>&2
|
|
64
67
|
|
|
65
68
|
goto fail
|
|
66
69
|
|
|
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
|
75
78
|
|
|
76
79
|
:end
|
|
77
80
|
@rem End local scope for the variables with windows NT shell
|
|
78
|
-
if
|
|
81
|
+
if %ERRORLEVEL% equ 0 goto mainEnd
|
|
79
82
|
|
|
80
83
|
:fail
|
|
81
84
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
82
85
|
rem the _cmd.exe /c_ return code!
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
set EXIT_CODE=%ERRORLEVEL%
|
|
87
|
+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
|
88
|
+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
89
|
+
exit /b %EXIT_CODE%
|
|
85
90
|
|
|
86
91
|
:mainEnd
|
|
87
92
|
if "%OS%"=="Windows_NT" endlocal
|
|
@@ -288,6 +288,11 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
288
288
|
view.setCacheEnabled(cacheEnabled);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
@ReactProp(name = "poiClickEnabled", defaultBoolean = true)
|
|
292
|
+
public void setPoiClickEnabled(MapView view, boolean poiClickEnabled) {
|
|
293
|
+
view.setPoiClickEnabled(poiClickEnabled);
|
|
294
|
+
}
|
|
295
|
+
|
|
291
296
|
@ReactProp(name = "loadingEnabled", defaultBoolean = false)
|
|
292
297
|
public void setLoadingEnabled(MapView view, boolean loadingEnabled) {
|
|
293
298
|
view.enableMapLoading(loadingEnabled);
|
|
@@ -104,6 +104,8 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
104
104
|
private boolean handlePanDrag = false;
|
|
105
105
|
private boolean moveOnMarkerPress = true;
|
|
106
106
|
private boolean cacheEnabled = false;
|
|
107
|
+
private boolean poiClickEnabled = true;
|
|
108
|
+
|
|
107
109
|
private ReadableMap initialRegion;
|
|
108
110
|
private ReadableMap region;
|
|
109
111
|
private ReadableMap initialCamera;
|
|
@@ -252,7 +254,6 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
252
254
|
|
|
253
255
|
markerCollection.setInfoWindowAdapter(this);
|
|
254
256
|
markerCollection.setOnMarkerDragListener(this);
|
|
255
|
-
this.map.setOnPoiClickListener(this);
|
|
256
257
|
this.map.setOnIndoorStateChangeListener(this);
|
|
257
258
|
|
|
258
259
|
applyBridgedProps();
|
|
@@ -565,6 +566,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
565
566
|
if(customMapStyleString != null) {
|
|
566
567
|
map.setMapStyle(new MapStyleOptions(customMapStyleString));
|
|
567
568
|
}
|
|
569
|
+
this.setPoiClickEnabled(poiClickEnabled);
|
|
568
570
|
}
|
|
569
571
|
|
|
570
572
|
private void moveToRegion(ReadableMap region) {
|
|
@@ -683,6 +685,11 @@ public static CameraPosition cameraPositionFromMap(ReadableMap camera){
|
|
|
683
685
|
this.cacheView();
|
|
684
686
|
}
|
|
685
687
|
|
|
688
|
+
public void setPoiClickEnabled(boolean poiClickEnabled) {
|
|
689
|
+
this.poiClickEnabled = poiClickEnabled;
|
|
690
|
+
map.setOnPoiClickListener(poiClickEnabled ? this : null);
|
|
691
|
+
}
|
|
692
|
+
|
|
686
693
|
public void enableMapLoading(boolean loadingEnabled) {
|
|
687
694
|
if (loadingEnabled && !this.isMapLoaded) {
|
|
688
695
|
this.getMapLoadingLayoutView().setVisibility(View.VISIBLE);
|
|
@@ -1508,4 +1515,5 @@ public static CameraPosition cameraPositionFromMap(ReadableMap camera){
|
|
|
1508
1515
|
layout(getLeft(), getTop(), getRight(), getBottom());
|
|
1509
1516
|
}
|
|
1510
1517
|
};
|
|
1518
|
+
|
|
1511
1519
|
}
|
package/lib/MapView.d.ts
CHANGED
|
@@ -48,6 +48,15 @@ export type MapViewProps = ViewProps & {
|
|
|
48
48
|
* @platform Android: Not supported
|
|
49
49
|
*/
|
|
50
50
|
followsUserLocation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If `false` the map will not capture PoI clicks
|
|
53
|
+
* This can improve click handling on the map for android
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
* @platform iOS: Not supported
|
|
57
|
+
* @platform Android: supported
|
|
58
|
+
*/
|
|
59
|
+
poiClickEnabled?: boolean;
|
|
51
60
|
/**
|
|
52
61
|
* The initial camera view the map should use. Use this prop instead of `camera`
|
|
53
62
|
* only if you don't want to control the camera of the map besides the initial view.
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.20.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -57,20 +57,28 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@commitlint/cli": "17.6.1",
|
|
59
59
|
"@commitlint/config-conventional": "17.6.1",
|
|
60
|
-
"@react-native/eslint-config": "^0.73.1",
|
|
61
60
|
"@semantic-release/changelog": "6.0.3",
|
|
62
61
|
"@semantic-release/git": "10.0.1",
|
|
63
|
-
"
|
|
62
|
+
"semantic-release": "24.2.0",
|
|
63
|
+
"husky": "8.0.3",
|
|
64
64
|
"@types/react-native": "0.72.8",
|
|
65
|
+
"@babel/core": "^7.25.2",
|
|
66
|
+
"@babel/preset-env": "^7.25.3",
|
|
67
|
+
"@babel/runtime": "^7.25.0",
|
|
68
|
+
"react-native": "^0.76.1",
|
|
69
|
+
"react": "^18.3.1",
|
|
70
|
+
"@react-native/babel-preset": "0.76.1",
|
|
71
|
+
"@react-native/eslint-config": "0.76.1",
|
|
72
|
+
"@react-native/metro-config": "0.76.1",
|
|
73
|
+
"@react-native/typescript-config": "0.76.1",
|
|
74
|
+
"@types/react": "^18.2.6",
|
|
75
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
65
76
|
"babel-jest": "^29.6.3",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"husky": "8.0.3",
|
|
77
|
+
"eslint": "^8.19.0",
|
|
78
|
+
"@types/jest": "29.5.1",
|
|
69
79
|
"jest": "^29.6.3",
|
|
70
80
|
"prettier": "2.8.8",
|
|
71
|
-
"react": "18.
|
|
72
|
-
"react-native": "0.73.0",
|
|
73
|
-
"semantic-release": "21.1.2",
|
|
81
|
+
"react-test-renderer": "18.3.1",
|
|
74
82
|
"typescript": "5.0.4"
|
|
75
83
|
},
|
|
76
84
|
"dependencies": {
|