Skip to content

Commit 590b429

Browse files
committed
feat: replace fromPath method with fromAsset for bitmapdescriptors on android
1 parent 3218cb1 commit 590b429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/com/google/android/react/navsdk/MapViewController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public Marker addMarker(Map<String, Object> optionsMap) {
144144

145145
MarkerOptions options = new MarkerOptions();
146146
if (imagePath != null && !imagePath.isEmpty()) {
147-
BitmapDescriptor icon = BitmapDescriptorFactory.fromPath(imagePath);
147+
BitmapDescriptor icon = BitmapDescriptorFactory.fromAsset(imagePath);
148148
options.icon(icon);
149149
}
150150

@@ -290,7 +290,7 @@ public GroundOverlay addGroundOverlay(Map<String, Object> map) {
290290

291291
GroundOverlayOptions options = new GroundOverlayOptions();
292292
if (imagePath != null && !imagePath.isEmpty()) {
293-
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromPath(imagePath);
293+
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromAsset(imagePath);
294294
options.image(bitmapDescriptor);
295295
}
296296
options.position(new LatLng(lat, lng), width, height);

0 commit comments

Comments
 (0)