react-native-maps 0.31.0-beta.5 → 0.31.1
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 +31 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapCalloutManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapMarker.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapMarkerManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapModule.java +10 -5
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapOverlayManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapPolygonManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/AirMapPolylineManager.java +2 -2
- package/android/src/main/java/com/airbnb/android/react/maps/ImageReader.java +2 -2
- package/package.json +1 -1
- package/react-native-maps.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
apply plugin: 'com.android.library'
|
|
2
|
-
|
|
3
1
|
def safeExtGet(prop, fallback) {
|
|
4
2
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
3
|
}
|
|
6
4
|
|
|
5
|
+
buildscript {
|
|
6
|
+
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
|
7
|
+
// This avoids unnecessary downloads and potential conflicts when the library is included as a
|
|
8
|
+
// module dependency in an application project.
|
|
9
|
+
if (project == rootProject) {
|
|
10
|
+
repositories {
|
|
11
|
+
google()
|
|
12
|
+
mavenCentral()
|
|
13
|
+
}
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath("com.android.tools.build:gradle:4.2.2")
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
apply plugin: 'com.android.library'
|
|
21
|
+
|
|
7
22
|
android {
|
|
8
23
|
compileSdkVersion safeExtGet('compileSdkVersion', 30)
|
|
9
24
|
|
|
@@ -13,6 +28,20 @@ android {
|
|
|
13
28
|
}
|
|
14
29
|
}
|
|
15
30
|
|
|
31
|
+
repositories {
|
|
32
|
+
mavenLocal()
|
|
33
|
+
mavenCentral()
|
|
34
|
+
maven {
|
|
35
|
+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
36
|
+
url "$rootDir/../node_modules/react-native/android"
|
|
37
|
+
}
|
|
38
|
+
maven {
|
|
39
|
+
// Android JSC is installed from npm
|
|
40
|
+
url "$rootDir/../node_modules/jsc-android/dist"
|
|
41
|
+
}
|
|
42
|
+
google()
|
|
43
|
+
}
|
|
44
|
+
|
|
16
45
|
dependencies {
|
|
17
46
|
def work_version = safeExtGet('targetSdkVersion', 27) < 31 ? "2.5.0" : "2.7.1"
|
|
18
47
|
implementation 'com.facebook.react:react-native:+'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
package com.airbnb.android.react.maps;
|
|
2
2
|
|
|
3
|
+
import androidx.annotation.Nullable;
|
|
4
|
+
|
|
3
5
|
import com.facebook.react.common.MapBuilder;
|
|
4
6
|
import com.facebook.react.uimanager.LayoutShadowNode;
|
|
5
7
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
@@ -8,8 +10,6 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
8
10
|
|
|
9
11
|
import java.util.Map;
|
|
10
12
|
|
|
11
|
-
import javax.annotation.Nullable;
|
|
12
|
-
|
|
13
13
|
public class AirMapCalloutManager extends ViewGroupManager<AirMapCallout> {
|
|
14
14
|
|
|
15
15
|
@Override
|
|
@@ -2,6 +2,8 @@ package com.airbnb.android.react.maps;
|
|
|
2
2
|
|
|
3
3
|
import android.view.View;
|
|
4
4
|
|
|
5
|
+
import androidx.annotation.Nullable;
|
|
6
|
+
|
|
5
7
|
import com.facebook.react.bridge.Arguments;
|
|
6
8
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
9
|
import com.facebook.react.bridge.ReadableArray;
|
|
@@ -24,8 +26,6 @@ import com.google.android.gms.maps.model.MapStyleOptions;
|
|
|
24
26
|
import java.util.HashMap;
|
|
25
27
|
import java.util.Map;
|
|
26
28
|
|
|
27
|
-
import javax.annotation.Nullable;
|
|
28
|
-
|
|
29
29
|
public class AirMapManager extends ViewGroupManager<AirMapView> {
|
|
30
30
|
|
|
31
31
|
private static final String REACT_CLASS = "AIRMap";
|
|
@@ -14,6 +14,8 @@ import android.animation.ObjectAnimator;
|
|
|
14
14
|
import android.util.Property;
|
|
15
15
|
import android.animation.TypeEvaluator;
|
|
16
16
|
|
|
17
|
+
import androidx.annotation.Nullable;
|
|
18
|
+
|
|
17
19
|
import com.facebook.common.references.CloseableReference;
|
|
18
20
|
import com.facebook.datasource.DataSource;
|
|
19
21
|
import com.facebook.drawee.backends.pipeline.Fresco;
|
|
@@ -38,8 +40,6 @@ import com.google.android.gms.maps.model.LatLng;
|
|
|
38
40
|
import com.google.android.gms.maps.model.Marker;
|
|
39
41
|
import com.google.android.gms.maps.model.MarkerOptions;
|
|
40
42
|
|
|
41
|
-
import javax.annotation.Nullable;
|
|
42
|
-
|
|
43
43
|
public class AirMapMarker extends AirMapFeature {
|
|
44
44
|
|
|
45
45
|
private MarkerOptions markerOptions;
|
|
@@ -4,6 +4,8 @@ import android.graphics.Bitmap;
|
|
|
4
4
|
import android.graphics.Color;
|
|
5
5
|
import android.view.View;
|
|
6
6
|
|
|
7
|
+
import androidx.annotation.Nullable;
|
|
8
|
+
|
|
7
9
|
import com.facebook.react.bridge.ReadableArray;
|
|
8
10
|
import com.facebook.react.bridge.ReadableMap;
|
|
9
11
|
import com.facebook.react.common.MapBuilder;
|
|
@@ -20,8 +22,6 @@ import java.util.Map;
|
|
|
20
22
|
import java.util.WeakHashMap;
|
|
21
23
|
import java.util.concurrent.ConcurrentHashMap;
|
|
22
24
|
|
|
23
|
-
import javax.annotation.Nullable;
|
|
24
|
-
|
|
25
25
|
public class AirMapMarkerManager extends ViewGroupManager<AirMapMarker> {
|
|
26
26
|
|
|
27
27
|
private static final int SHOW_INFO_WINDOW = 1;
|
|
@@ -10,6 +10,9 @@ import android.util.Base64;
|
|
|
10
10
|
import android.util.DisplayMetrics;
|
|
11
11
|
import android.util.Log;
|
|
12
12
|
|
|
13
|
+
import androidx.annotation.Nullable;
|
|
14
|
+
import androidx.annotation.NonNull;
|
|
15
|
+
|
|
13
16
|
import com.facebook.react.bridge.Promise;
|
|
14
17
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
15
18
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
@@ -23,6 +26,7 @@ import com.facebook.react.uimanager.UIBlock;
|
|
|
23
26
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
24
27
|
import com.google.android.gms.maps.GoogleMap;
|
|
25
28
|
import com.google.android.gms.maps.MapsInitializer;
|
|
29
|
+
import com.google.android.gms.maps.OnMapsSdkInitializedCallback;
|
|
26
30
|
import com.google.android.gms.maps.model.CameraPosition;
|
|
27
31
|
import com.google.android.gms.maps.model.LatLng;
|
|
28
32
|
|
|
@@ -36,8 +40,6 @@ import java.util.List;
|
|
|
36
40
|
import java.util.Map;
|
|
37
41
|
import java.util.HashMap;
|
|
38
42
|
|
|
39
|
-
import javax.annotation.Nullable;
|
|
40
|
-
|
|
41
43
|
@ReactModule(name = AirMapModule.NAME)
|
|
42
44
|
public class AirMapModule extends ReactContextBaseJavaModule {
|
|
43
45
|
|
|
@@ -365,9 +367,12 @@ public class AirMapModule extends ReactContextBaseJavaModule {
|
|
|
365
367
|
@Override
|
|
366
368
|
public void execute(NativeViewHierarchyManager nvhm)
|
|
367
369
|
{
|
|
368
|
-
MapsInitializer.initialize(context, MapsInitializer.Renderer.LATEST, (
|
|
369
|
-
|
|
370
|
-
|
|
370
|
+
MapsInitializer.initialize(context, MapsInitializer.Renderer.LATEST, new OnMapsSdkInitializedCallback() {
|
|
371
|
+
@Override
|
|
372
|
+
public void onMapsSdkInitialized(@NonNull MapsInitializer.Renderer renderer) {
|
|
373
|
+
Log.d("AirMapRenderer", renderer.toString());
|
|
374
|
+
promise.resolve(renderer.toString());
|
|
375
|
+
}
|
|
371
376
|
});
|
|
372
377
|
}
|
|
373
378
|
});
|
|
@@ -5,6 +5,8 @@ import android.os.Build;
|
|
|
5
5
|
import android.util.DisplayMetrics;
|
|
6
6
|
import android.view.WindowManager;
|
|
7
7
|
|
|
8
|
+
import androidx.annotation.Nullable;
|
|
9
|
+
|
|
8
10
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
9
11
|
import com.facebook.react.bridge.ReadableArray;
|
|
10
12
|
import com.facebook.react.common.MapBuilder;
|
|
@@ -14,8 +16,6 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
14
16
|
|
|
15
17
|
import java.util.Map;
|
|
16
18
|
|
|
17
|
-
import javax.annotation.Nullable;
|
|
18
|
-
|
|
19
19
|
public class AirMapOverlayManager extends ViewGroupManager<AirMapOverlay> {
|
|
20
20
|
private final DisplayMetrics metrics;
|
|
21
21
|
|
|
@@ -6,6 +6,8 @@ import android.os.Build;
|
|
|
6
6
|
import android.util.DisplayMetrics;
|
|
7
7
|
import android.view.WindowManager;
|
|
8
8
|
|
|
9
|
+
import androidx.annotation.Nullable;
|
|
10
|
+
|
|
9
11
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
10
12
|
import com.facebook.react.bridge.ReadableArray;
|
|
11
13
|
import com.facebook.react.common.MapBuilder;
|
|
@@ -15,8 +17,6 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
15
17
|
|
|
16
18
|
import java.util.Map;
|
|
17
19
|
|
|
18
|
-
import javax.annotation.Nullable;
|
|
19
|
-
|
|
20
20
|
public class AirMapPolygonManager extends ViewGroupManager<AirMapPolygon> {
|
|
21
21
|
private final DisplayMetrics metrics;
|
|
22
22
|
|
|
@@ -6,6 +6,8 @@ import android.os.Build;
|
|
|
6
6
|
import android.util.DisplayMetrics;
|
|
7
7
|
import android.view.WindowManager;
|
|
8
8
|
|
|
9
|
+
import androidx.annotation.Nullable;
|
|
10
|
+
|
|
9
11
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
10
12
|
import com.facebook.react.bridge.ReadableArray;
|
|
11
13
|
import com.facebook.react.common.MapBuilder;
|
|
@@ -19,8 +21,6 @@ import com.google.android.gms.maps.model.SquareCap;
|
|
|
19
21
|
|
|
20
22
|
import java.util.Map;
|
|
21
23
|
|
|
22
|
-
import javax.annotation.Nullable;
|
|
23
|
-
|
|
24
24
|
public class AirMapPolylineManager extends ViewGroupManager<AirMapPolyline> {
|
|
25
25
|
private final DisplayMetrics metrics;
|
|
26
26
|
|
|
@@ -7,6 +7,8 @@ import android.graphics.BitmapFactory;
|
|
|
7
7
|
import android.graphics.drawable.Animatable;
|
|
8
8
|
import android.net.Uri;
|
|
9
9
|
|
|
10
|
+
import androidx.annotation.Nullable;
|
|
11
|
+
|
|
10
12
|
import com.facebook.common.references.CloseableReference;
|
|
11
13
|
import com.facebook.datasource.DataSource;
|
|
12
14
|
import com.facebook.drawee.backends.pipeline.Fresco;
|
|
@@ -26,8 +28,6 @@ import com.facebook.imagepipeline.request.ImageRequestBuilder;
|
|
|
26
28
|
import com.google.android.gms.maps.model.BitmapDescriptor;
|
|
27
29
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
28
30
|
|
|
29
|
-
import javax.annotation.Nullable;
|
|
30
|
-
|
|
31
31
|
public class ImageReader {
|
|
32
32
|
|
|
33
33
|
private final ImageReadable imp;
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.authors = { "intelligibabble" => "leland.m.richardson@gmail.com" }
|
|
11
11
|
s.homepage = "https://github.com/react-native-maps/react-native-maps#readme"
|
|
12
12
|
s.license = "MIT"
|
|
13
|
-
s.platform = :ios, "
|
|
13
|
+
s.platform = :ios, "11.0"
|
|
14
14
|
|
|
15
15
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
16
16
|
s.source_files = "ios/AirMaps/**/*.{h,m}"
|