react-native-maps 1.24.14 → 1.24.16
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.
|
@@ -144,7 +144,11 @@ public class MarkerManager extends ViewGroupManager<MapMarker> implements RNMaps
|
|
|
144
144
|
|
|
145
145
|
@Override
|
|
146
146
|
public void setImage(MapMarker view, @Nullable ReadableMap value) {
|
|
147
|
-
|
|
147
|
+
if (value != null && value.hasKey("uri")) {
|
|
148
|
+
view.setImage(value.getString("uri"));
|
|
149
|
+
} else {
|
|
150
|
+
view.setImage(null);
|
|
151
|
+
}
|
|
148
152
|
view.setUpdated(true);
|
|
149
153
|
}
|
|
150
154
|
|
|
@@ -135,7 +135,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
135
135
|
private static final String[] PERMISSIONS = new String[]{
|
|
136
136
|
"android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"};
|
|
137
137
|
|
|
138
|
-
private final
|
|
138
|
+
private final Map<Integer, MapFeature> features = new HashMap<>();
|
|
139
139
|
private final Map<Marker, MapMarker> markerMap = new HashMap<>();
|
|
140
140
|
private final Map<Polyline, MapPolyline> polylineMap = new HashMap<>();
|
|
141
141
|
private final Map<Polygon, MapPolygon> polygonMap = new HashMap<>();
|
|
@@ -342,7 +342,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
342
342
|
LatLngBounds.Builder builder = new LatLngBounds.Builder();
|
|
343
343
|
boolean addedPosition = false;
|
|
344
344
|
LatLngBounds mapBounds = map.getProjection().getVisibleRegion().latLngBounds;
|
|
345
|
-
for (MapFeature feature : features) {
|
|
345
|
+
for (MapFeature feature : features.values()) {
|
|
346
346
|
if (feature instanceof MapMarker) {
|
|
347
347
|
Marker marker = (Marker) feature.getFeature();
|
|
348
348
|
if (!onlyVisible ||
|
|
@@ -1084,7 +1084,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1084
1084
|
if (child instanceof MapMarker) {
|
|
1085
1085
|
MapMarker annotation = (MapMarker) child;
|
|
1086
1086
|
annotation.addToMap(markerCollection);
|
|
1087
|
-
features.
|
|
1087
|
+
features.put(index, annotation);
|
|
1088
1088
|
|
|
1089
1089
|
// Allow visibility event to be triggered later
|
|
1090
1090
|
int visibility = annotation.getVisibility();
|
|
@@ -1110,47 +1110,47 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1110
1110
|
} else if (child instanceof MapPolyline) {
|
|
1111
1111
|
MapPolyline polylineView = (MapPolyline) child;
|
|
1112
1112
|
polylineView.addToMap(polylineCollection);
|
|
1113
|
-
features.
|
|
1113
|
+
features.put(index, polylineView);
|
|
1114
1114
|
Polyline polyline = (Polyline) polylineView.getFeature();
|
|
1115
1115
|
polylineMap.put(polyline, polylineView);
|
|
1116
1116
|
} else if (child instanceof MapGradientPolyline) {
|
|
1117
1117
|
MapGradientPolyline polylineView = (MapGradientPolyline) child;
|
|
1118
1118
|
polylineView.addToMap(map);
|
|
1119
|
-
features.
|
|
1119
|
+
features.put(index, polylineView);
|
|
1120
1120
|
TileOverlay tileOverlay = (TileOverlay) polylineView.getFeature();
|
|
1121
1121
|
gradientPolylineMap.put(tileOverlay, polylineView);
|
|
1122
1122
|
} else if (child instanceof MapPolygon) {
|
|
1123
1123
|
MapPolygon polygonView = (MapPolygon) child;
|
|
1124
1124
|
polygonView.addToMap(polygonCollection);
|
|
1125
|
-
features.
|
|
1125
|
+
features.put(index, polygonView);
|
|
1126
1126
|
Polygon polygon = (Polygon) polygonView.getFeature();
|
|
1127
1127
|
polygonMap.put(polygon, polygonView);
|
|
1128
1128
|
} else if (child instanceof MapCircle) {
|
|
1129
1129
|
MapCircle circleView = (MapCircle) child;
|
|
1130
1130
|
circleView.addToMap(circleCollection);
|
|
1131
|
-
features.
|
|
1131
|
+
features.put(index, circleView);
|
|
1132
1132
|
} else if (child instanceof MapUrlTile) {
|
|
1133
1133
|
MapUrlTile urlTileView = (MapUrlTile) child;
|
|
1134
1134
|
urlTileView.addToMap(map);
|
|
1135
|
-
features.
|
|
1135
|
+
features.put(index, urlTileView);
|
|
1136
1136
|
} else if (child instanceof MapWMSTile) {
|
|
1137
1137
|
MapWMSTile urlTileView = (MapWMSTile) child;
|
|
1138
1138
|
urlTileView.addToMap(map);
|
|
1139
|
-
features.
|
|
1139
|
+
features.put(index, urlTileView);
|
|
1140
1140
|
} else if (child instanceof MapLocalTile) {
|
|
1141
1141
|
MapLocalTile localTileView = (MapLocalTile) child;
|
|
1142
1142
|
localTileView.addToMap(map);
|
|
1143
|
-
features.
|
|
1143
|
+
features.put(index, localTileView);
|
|
1144
1144
|
} else if (child instanceof MapOverlay) {
|
|
1145
1145
|
MapOverlay overlayView = (MapOverlay) child;
|
|
1146
1146
|
overlayView.addToMap(groundOverlayCollection);
|
|
1147
|
-
features.
|
|
1147
|
+
features.put(index, overlayView);
|
|
1148
1148
|
GroundOverlay overlay = (GroundOverlay) overlayView.getFeature();
|
|
1149
1149
|
overlayMap.put(overlay, overlayView);
|
|
1150
1150
|
} else if (child instanceof MapHeatmap) {
|
|
1151
1151
|
MapHeatmap heatmapView = (MapHeatmap) child;
|
|
1152
1152
|
heatmapView.addToMap(map);
|
|
1153
|
-
features.
|
|
1153
|
+
features.put(index, heatmapView);
|
|
1154
1154
|
TileOverlay heatmap = (TileOverlay) heatmapView.getFeature();
|
|
1155
1155
|
heatmapMap.put(heatmap, heatmapView);
|
|
1156
1156
|
} else if (child instanceof ViewGroup) {
|
|
@@ -1295,8 +1295,8 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1295
1295
|
LatLngBounds.Builder builder = new LatLngBounds.Builder();
|
|
1296
1296
|
|
|
1297
1297
|
boolean addedPosition = false;
|
|
1298
|
-
if (features.
|
|
1299
|
-
for (MapFeature feature : features) {
|
|
1298
|
+
if (!features.isEmpty()) {
|
|
1299
|
+
for (MapFeature feature : features.values()) {
|
|
1300
1300
|
if (feature instanceof MapMarker) {
|
|
1301
1301
|
Marker marker = (Marker) feature.getFeature();
|
|
1302
1302
|
builder.include(marker.getPosition());
|
|
@@ -1338,7 +1338,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1338
1338
|
|
|
1339
1339
|
List<String> markerIDList = Arrays.asList(markerIDs);
|
|
1340
1340
|
|
|
1341
|
-
for (MapFeature feature : features) {
|
|
1341
|
+
for (MapFeature feature : features.values()) {
|
|
1342
1342
|
if (feature instanceof MapMarker) {
|
|
1343
1343
|
String identifier = ((MapMarker) feature).getIdentifier();
|
|
1344
1344
|
Marker marker = (Marker) feature.getFeature();
|
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.16",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|