react-native-maps 1.10.2 → 1.10.3

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.
@@ -279,6 +279,7 @@ export declare class MapMarker extends React.Component<MapMarkerProps> {
279
279
  setNativeProps(props: Partial<NativeProps>): void;
280
280
  showCallout(): void;
281
281
  hideCallout(): void;
282
+ setCoordinates(coordinate: LatLng): void;
282
283
  redrawCallout(): void;
283
284
  animateMarkerToCoordinate(coordinate: LatLng, duration?: number): void;
284
285
  redraw(): void;
package/lib/MapMarker.js CHANGED
@@ -39,6 +39,7 @@ class MapMarker extends React.Component {
39
39
  this.marker = React.createRef();
40
40
  this.showCallout = this.showCallout.bind(this);
41
41
  this.hideCallout = this.hideCallout.bind(this);
42
+ this.setCoordinates = this.setCoordinates.bind(this);
42
43
  this.redrawCallout = this.redrawCallout.bind(this);
43
44
  this.animateMarkerToCoordinate = this.animateMarkerToCoordinate.bind(this);
44
45
  }
@@ -56,6 +57,11 @@ class MapMarker extends React.Component {
56
57
  MapMarkerNativeComponent_1.Commands.hideCallout(this.marker.current);
57
58
  }
58
59
  }
60
+ setCoordinates(coordinate) {
61
+ if (this.marker.current) {
62
+ MapMarkerNativeComponent_1.Commands.setCoordinates(this.marker.current, coordinate);
63
+ }
64
+ }
59
65
  redrawCallout() {
60
66
  if (this.marker.current) {
61
67
  MapMarkerNativeComponent_1.Commands.redrawCallout(this.marker.current);
@@ -6,6 +6,7 @@ export type MapMarkerNativeComponentType = HostComponent<NativeProps>;
6
6
  interface NativeCommands {
7
7
  showCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
8
8
  hideCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
9
+ setCoordinates: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>, coordinate: LatLng) => void;
9
10
  redrawCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
10
11
  animateMarkerToCoordinate: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>, coordinate: LatLng, duration: number) => void;
11
12
  redraw: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
@@ -12,5 +12,6 @@ exports.Commands = (0, codegenNativeCommands_1.default)({
12
12
  'redrawCallout',
13
13
  'animateMarkerToCoordinate',
14
14
  'redraw',
15
+ 'setCoordinates',
15
16
  ],
16
17
  });
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.10.2",
8
+ "version": "1.10.3",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",