react-native-maps 1.24.10 → 1.24.11
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.
|
@@ -128,8 +128,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
128
128
|
private String customMapStyleString;
|
|
129
129
|
private boolean initialRegionSet = false;
|
|
130
130
|
private boolean initialCameraSet = false;
|
|
131
|
-
private
|
|
132
|
-
private int cameraMoveReason = 0;
|
|
131
|
+
private int cameraMoveReason = -1;
|
|
133
132
|
private MapMarker selectedMarker;
|
|
134
133
|
|
|
135
134
|
private LifecycleOwner currentLifecycleOwner;
|
|
@@ -601,24 +600,18 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
601
600
|
});
|
|
602
601
|
|
|
603
602
|
map.setOnCameraMoveListener(() -> {
|
|
604
|
-
LatLngBounds bounds = map.getProjection().getVisibleRegion().latLngBounds;
|
|
605
|
-
cameraLastIdleBounds = null;
|
|
606
603
|
boolean isGesture = GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE == cameraMoveReason;
|
|
604
|
+
LatLngBounds bounds = map.getProjection().getVisibleRegion().latLngBounds;
|
|
607
605
|
WritableMap payload = OnRegionChangeEvent.payLoadFor(bounds, isGesture);
|
|
608
606
|
dispatchEvent(payload, OnRegionChangeEvent::new);
|
|
609
607
|
});
|
|
610
608
|
|
|
611
609
|
map.setOnCameraIdleListener(() -> {
|
|
610
|
+
boolean isGesture = GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE == cameraMoveReason;
|
|
611
|
+
cameraMoveReason = -1;
|
|
612
612
|
LatLngBounds bounds = map.getProjection().getVisibleRegion().latLngBounds;
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
LatLngBoundsUtils.BoundsAreDifferent(bounds, cameraLastIdleBounds))) {
|
|
616
|
-
|
|
617
|
-
cameraLastIdleBounds = bounds;
|
|
618
|
-
boolean isGesture = GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE == cameraMoveReason;
|
|
619
|
-
WritableMap payload = OnRegionChangeEvent.payLoadFor(bounds, isGesture);
|
|
620
|
-
dispatchEvent(payload, OnRegionChangeCompleteEvent::new);
|
|
621
|
-
}
|
|
613
|
+
WritableMap payload = OnRegionChangeEvent.payLoadFor(bounds, isGesture);
|
|
614
|
+
dispatchEvent(payload, OnRegionChangeCompleteEvent::new);
|
|
622
615
|
});
|
|
623
616
|
|
|
624
617
|
map.setOnMapLoadedCallback(() -> {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "src/index.ts",
|
|
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.24.
|
|
8
|
+
"version": "1.24.11",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|