react-native-maps 1.1.0-beta.1 → 1.1.0-beta.4
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 +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapManager.java +5 -5
- package/android/src/main/java/com/airbnb/android/react/maps/FusedLocationSource.java +4 -1
- package/ios/AirGoogleMaps/AIRGoogleMap.h +1 -1
- package/lib/MapView.types.d.ts +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -45,9 +45,9 @@ repositories {
|
|
|
45
45
|
dependencies {
|
|
46
46
|
def work_version = safeExtGet('targetSdkVersion', 27) < 31 ? "2.5.0" : "2.7.1"
|
|
47
47
|
implementation 'com.facebook.react:react-native:+'
|
|
48
|
-
implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.0
|
|
48
|
+
implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '18.1.0')}"
|
|
49
49
|
implementation "com.google.android.gms:play-services-maps:${safeExtGet('playServicesVersion', '18.0.2')}"
|
|
50
|
-
implementation "com.google.android.gms:play-services-location:
|
|
50
|
+
implementation "com.google.android.gms:play-services-location:20.0.0"
|
|
51
51
|
implementation 'com.google.maps.android:android-maps-utils:0.5'
|
|
52
52
|
implementation "androidx.work:work-runtime:$work_version"
|
|
53
53
|
}
|
|
@@ -16,7 +16,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
|
|
|
16
16
|
import com.facebook.react.uimanager.ViewGroupManager;
|
|
17
17
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
18
18
|
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
|
19
|
-
import com.google.android.gms.location.
|
|
19
|
+
import com.google.android.gms.location.Priority;
|
|
20
20
|
import com.google.android.gms.maps.GoogleMap;
|
|
21
21
|
import com.google.android.gms.maps.GoogleMapOptions;
|
|
22
22
|
import com.google.android.gms.maps.model.LatLng;
|
|
@@ -52,10 +52,10 @@ public class AirMapManager extends ViewGroupManager<AirMapView> {
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
private final Map<String, Integer> MY_LOCATION_PRIORITY = MapBuilder.of(
|
|
55
|
-
"balanced",
|
|
56
|
-
"high",
|
|
57
|
-
"low",
|
|
58
|
-
"passive",
|
|
55
|
+
"balanced", Priority.PRIORITY_BALANCED_POWER_ACCURACY,
|
|
56
|
+
"high", Priority.PRIORITY_HIGH_ACCURACY,
|
|
57
|
+
"low", Priority.PRIORITY_LOW_POWER,
|
|
58
|
+
"passive", Priority.PRIORITY_PASSIVE
|
|
59
59
|
);
|
|
60
60
|
|
|
61
61
|
private final ReactApplicationContext appContext;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.airbnb.android.react.maps;
|
|
2
2
|
|
|
3
|
+
import android.annotation.SuppressLint;
|
|
3
4
|
import android.content.Context;
|
|
4
5
|
import android.location.Location;
|
|
5
6
|
import android.os.Looper;
|
|
@@ -9,6 +10,7 @@ import com.google.android.gms.location.LocationCallback;
|
|
|
9
10
|
import com.google.android.gms.location.LocationRequest;
|
|
10
11
|
import com.google.android.gms.location.LocationResult;
|
|
11
12
|
import com.google.android.gms.location.LocationServices;
|
|
13
|
+
import com.google.android.gms.location.Priority;
|
|
12
14
|
import com.google.android.gms.maps.LocationSource;
|
|
13
15
|
import com.google.android.gms.tasks.OnSuccessListener;
|
|
14
16
|
|
|
@@ -24,7 +26,7 @@ public class FusedLocationSource implements LocationSource {
|
|
|
24
26
|
fusedLocationClientProviderClient =
|
|
25
27
|
LocationServices.getFusedLocationProviderClient(context);
|
|
26
28
|
locationRequest = LocationRequest.create();
|
|
27
|
-
locationRequest.setPriority(
|
|
29
|
+
locationRequest.setPriority(Priority.PRIORITY_HIGH_ACCURACY);
|
|
28
30
|
locationRequest.setInterval(5000);
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -40,6 +42,7 @@ public class FusedLocationSource implements LocationSource {
|
|
|
40
42
|
locationRequest.setFastestInterval(fastestInterval);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
@SuppressLint("MissingPermission")
|
|
43
46
|
@Override
|
|
44
47
|
public void activate(final OnLocationChangedListener onLocationChangedListener) {
|
|
45
48
|
try {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@property (nonatomic, assign) MKCoordinateRegion initialRegion;
|
|
23
23
|
@property (nonatomic, assign) MKCoordinateRegion region;
|
|
24
24
|
@property (nonatomic, assign) GMSCameraPosition *cameraProp; // Because the base class already has a "camera" prop.
|
|
25
|
-
@property (nonatomic,
|
|
25
|
+
@property (nonatomic, strong) GMSCameraPosition *initialCamera;
|
|
26
26
|
@property (nonatomic, assign) NSString *customMapStyleString;
|
|
27
27
|
@property (nonatomic, assign) UIEdgeInsets mapPadding;
|
|
28
28
|
@property (nonatomic, assign) NSString *paddingAdjustmentBehaviorString;
|
package/lib/MapView.types.d.ts
CHANGED
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.1.0-beta.
|
|
8
|
+
"version": "1.1.0-beta.4",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|