react-native-maps 1.24.12 → 1.24.14

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.
@@ -262,8 +262,9 @@ public class MarkerManager extends ViewGroupManager<MapMarker> implements RNMaps
262
262
 
263
263
  @Override
264
264
  public void redraw(MapMarker view) {
265
- view.setUpdated(true);
265
+ view.redraw();
266
266
  }
267
+
267
268
  @Override
268
269
  public void addView(MapMarker parent, View child, int index) {
269
270
  // if an <Callout /> component is a child, then it is a callout view, NOT part of the
@@ -14,6 +14,9 @@ import android.animation.ObjectAnimator;
14
14
  import android.util.Property;
15
15
  import android.animation.TypeEvaluator;
16
16
 
17
+ import android.os.Handler;
18
+ import android.os.Looper;
19
+
17
20
  import androidx.annotation.Nullable;
18
21
 
19
22
  import com.facebook.common.references.CloseableReference;
@@ -565,6 +568,15 @@ public class MapMarker extends MapFeature {
565
568
  update(true);
566
569
  }
567
570
 
571
+ public void redraw() {
572
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
573
+ @Override
574
+ public void run() {
575
+ updateMarkerIcon();
576
+ }
577
+ });
578
+ }
579
+
568
580
  private Bitmap mLastBitmapCreated = null;
569
581
 
570
582
  private void clearDrawableCache() {
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.12",
8
+ "version": "1.24.14",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",
package/src/MapMarker.tsx CHANGED
@@ -468,7 +468,12 @@ export class MapMarker extends React.Component<MapMarkerProps> {
468
468
 
469
469
  redraw() {
470
470
  if (this.marker.current) {
471
- Commands.redraw(this.marker.current);
471
+ if (this.fabricMarker) {
472
+ // @ts-ignore
473
+ FabricCommands.redraw(this.marker.current);
474
+ } else {
475
+ Commands.redraw(this.marker.current);
476
+ }
472
477
  }
473
478
  }
474
479
 
@@ -47,5 +47,6 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
47
47
  'hideCallout',
48
48
  'animateMarkerToCoordinate',
49
49
  'setCoordinates',
50
+ 'redraw',
50
51
  ],
51
52
  });
package/src/MapView.tsx CHANGED
@@ -596,6 +596,15 @@ export type MapViewProps = ViewProps & {
596
596
  */
597
597
  showsScale?: boolean;
598
598
 
599
+ /**
600
+ * A Boolean value indicating whether the map displays traffic information.
601
+ *
602
+ * @default false
603
+ * @platform iOS: Supported
604
+ * @platform Android: Supported
605
+ */
606
+ showsTraffic?: boolean;
607
+
599
608
  /**
600
609
  * If `true` the users location will be displayed on the map.
601
610
  *