react-native-maps 1.26.16 → 1.26.18

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.
@@ -35,11 +35,9 @@ import com.google.android.gms.maps.model.LatLng;
35
35
  import com.google.android.gms.maps.model.LatLngBounds;
36
36
  import com.google.android.gms.maps.model.MapColorScheme;
37
37
  import com.rnmaps.maps.MapMarker;
38
- import com.rnmaps.maps.MapOverlay;
39
38
  import com.rnmaps.maps.MapView;
40
39
  import com.rnmaps.maps.SizeReportingShadowNode;
41
40
 
42
- import java.util.List;
43
41
  import java.util.Map;
44
42
 
45
43
  @ReactModule(name = MapViewManager.REACT_CLASS)
@@ -780,13 +780,16 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
780
780
  destroyed = true;
781
781
  savedMapState = null;
782
782
  savedFeatures = null;
783
-
784
- if (!paused) {
785
- onPause();
786
- paused = true;
783
+ try {
784
+ if (!paused) {
785
+ onPause();
786
+ paused = true;
787
+ }
788
+ onDestroy();
789
+ detachLifecycleObserver();
790
+ } catch (Exception exception){
791
+ Log.e("MapView", "exception with destroying", exception);
787
792
  }
788
- onDestroy();
789
- detachLifecycleObserver();
790
793
  }
791
794
 
792
795
  public void setInitialCameraSet(boolean initialCameraSet) {
@@ -1244,7 +1247,10 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
1244
1247
  }
1245
1248
 
1246
1249
  public View getFeatureAt(int index) {
1247
- return features.get(index);
1250
+ if (index < features.size()) {
1251
+ return features.get(index);
1252
+ }
1253
+ return null;
1248
1254
  }
1249
1255
 
1250
1256
  public void removeFeatureAt(int index) {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "types": "dist/src/index.d.ts",
8
8
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
9
9
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
10
- "version": "1.26.16",
10
+ "version": "1.26.18",
11
11
  "license": "MIT",
12
12
  "scripts": {
13
13
  "lint": "eslint . --max-warnings 0",