react-native-maps 1.10.4 → 1.11.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
CHANGED
|
@@ -19,6 +19,10 @@ buildscript {
|
|
|
19
19
|
|
|
20
20
|
apply plugin: 'com.android.library'
|
|
21
21
|
|
|
22
|
+
def isNewArchitectureEnabled() {
|
|
23
|
+
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
android {
|
|
23
27
|
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
24
28
|
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
|
|
@@ -30,6 +34,8 @@ android {
|
|
|
30
34
|
defaultConfig {
|
|
31
35
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
32
36
|
targetSdkVersion safeExtGet('targetSdkVersion', 34)
|
|
37
|
+
|
|
38
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
@@ -450,8 +450,10 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
void pushEvent(ThemedReactContext context, View view, String name, WritableMap data) {
|
|
453
|
-
context
|
|
454
|
-
|
|
453
|
+
context
|
|
454
|
+
.getReactApplicationContext()
|
|
455
|
+
.getJSModule(RCTEventEmitter.class)
|
|
456
|
+
.receiveEvent(view.getId(), name, data);
|
|
455
457
|
}
|
|
456
458
|
|
|
457
459
|
@Override
|
|
@@ -30,7 +30,9 @@ import com.facebook.react.bridge.WritableNativeArray;
|
|
|
30
30
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
31
31
|
import com.facebook.react.bridge.Arguments;
|
|
32
32
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
33
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
33
34
|
import com.facebook.react.uimanager.UIManagerModule;
|
|
35
|
+
import com.facebook.react.uimanager.common.UIManagerType;
|
|
34
36
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
35
37
|
import com.google.android.gms.maps.CameraUpdate;
|
|
36
38
|
import com.google.android.gms.maps.CameraUpdateFactory;
|
|
@@ -208,7 +210,14 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
208
210
|
}
|
|
209
211
|
});
|
|
210
212
|
|
|
211
|
-
|
|
213
|
+
int uiManagerType = UIManagerType.DEFAULT;
|
|
214
|
+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
215
|
+
uiManagerType = UIManagerType.FABRIC;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
eventDispatcher = UIManagerHelper
|
|
219
|
+
.getUIManager(reactContext, uiManagerType)
|
|
220
|
+
.getEventDispatcher();
|
|
212
221
|
|
|
213
222
|
// Set up a parent view for triggering visibility in subviews that depend on it.
|
|
214
223
|
// Mainly ReactImageView depends on Fresco which depends on onVisibilityChanged() event
|
|
@@ -18,12 +18,13 @@ public class ViewChangesTracker {
|
|
|
18
18
|
handler = new Handler(Looper.myLooper());
|
|
19
19
|
updateRunnable = new Runnable() {
|
|
20
20
|
@Override
|
|
21
|
-
public void run() {
|
|
22
|
-
hasScheduledFrame = false;
|
|
21
|
+
public void run() {
|
|
23
22
|
update();
|
|
24
23
|
|
|
25
24
|
if (markers.size() > 0) {
|
|
26
25
|
handler.postDelayed(updateRunnable, fps);
|
|
26
|
+
} else {
|
|
27
|
+
hasScheduledFrame = false;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
};
|
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.11.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|