react-native-maps 1.21.0-alpha.22 → 1.21.0-alpha.23

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.
@@ -295,10 +295,9 @@ export declare class MapMarker extends React.Component<MapMarkerProps> {
295
295
  getUIManagerCommand: (name: string) => UIManagerCommand;
296
296
  static Animated: Animated.AnimatedComponent<typeof MapMarker>;
297
297
  private marker;
298
- private fabricMarker;
298
+ private fabricMarker?;
299
299
  constructor(props: MapMarkerProps);
300
300
  setNativeProps(props: Partial<NativeProps>): void;
301
- componentDidMount(): void;
302
301
  showCallout(): void;
303
302
  hideCallout(): void;
304
303
  setCoordinates(coordinate: LatLng): void;
package/lib/MapMarker.js CHANGED
@@ -36,7 +36,7 @@ class MapMarker extends React.Component {
36
36
  getUIManagerCommand;
37
37
  static Animated;
38
38
  marker;
39
- fabricMarker = false;
39
+ fabricMarker = undefined;
40
40
  constructor(props) {
41
41
  super(props);
42
42
  this.marker = React.createRef();
@@ -50,10 +50,6 @@ class MapMarker extends React.Component {
50
50
  // @ts-ignore
51
51
  this.marker.current?.setNativeProps(props);
52
52
  }
53
- componentDidMount() {
54
- const provider = this.context;
55
- this.fabricMarker = provider !== ProviderConstants_1.PROVIDER_GOOGLE && react_native_1.Platform.OS === 'ios';
56
- }
57
53
  showCallout() {
58
54
  if (this.marker.current) {
59
55
  if (this.fabricMarker) {
@@ -118,6 +114,10 @@ class MapMarker extends React.Component {
118
114
  }
119
115
  render() {
120
116
  const { stopPropagation = false } = this.props;
117
+ if (this.fabricMarker === undefined) {
118
+ const provider = this.context;
119
+ this.fabricMarker = provider !== ProviderConstants_1.PROVIDER_GOOGLE && react_native_1.Platform.OS === 'ios';
120
+ }
121
121
  let icon;
122
122
  if (this.props.icon) {
123
123
  icon = react_native_1.Image.resolveAssetSource(this.props.icon) || {};
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.21.0-alpha.22",
8
+ "version": "1.21.0-alpha.23",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",