Skip to content

Commit 05f8c3f

Browse files
fix: react-native-maps version update and callout bug fix (#180)
2 parents 5f899b3 + 5a06de0 commit 05f8c3f

4 files changed

Lines changed: 22 additions & 17 deletions

File tree

packages/pluggableWidgets/maps-native/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- We updated the `react-native-maps` version to `1.14.0`
12+
913
## [4.0.0] - 2023-3-28
1014

1115
## BREAKING

packages/pluggableWidgets/maps-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@mendix/piw-utils-internal": "*",
3030
"prop-types": "^15.7.2",
3131
"react-native-geocoder": "0.5.0",
32-
"react-native-maps": "0.31.1"
32+
"react-native-maps": "1.14.0"
3333
},
3434
"devDependencies": {
3535
"@mendix/pluggable-widgets-tools": "^9.0.0",

packages/pluggableWidgets/maps-native/src/Maps.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ActionValue, ValueStatus, Option } from "mendix";
33
import { Icon } from "mendix/components/native/Icon";
44
import { Component, createElement, createRef } from "react";
55
import { ActivityIndicator, Platform, View } from "react-native";
6-
import MapView, { LatLng, Marker as MarkerView } from "react-native-maps";
6+
import MapView, { Callout, LatLng, Marker as MarkerView } from "react-native-maps";
77
import { Big } from "big.js";
88

99
import { DefaultZoomLevelEnum, DynamicMarkersType, MapsProps, MarkersType } from "../typings/MapsProps";
@@ -75,7 +75,7 @@ export class Maps extends Component<Props, State> {
7575
{this.state.status !== Status.LoadingMarkers ? (
7676
<MapView
7777
ref={this.mapViewRef}
78-
provider={this.props.provider === "default" ? null : this.props.provider}
78+
provider={this.props.provider === "default" ? undefined : this.props.provider}
7979
mapType={this.props.mapType}
8080
showsUserLocation={this.props.showsUserLocation}
8181
showsMyLocationButton={this.props.showsUserLocation}
@@ -107,6 +107,7 @@ export class Maps extends Component<Props, State> {
107107
}
108108

109109
private renderMarker({ key, props, coordinate }: Marker): JSX.Element {
110+
const isFilled = props.description || props.title;
110111
return (
111112
<MarkerView
112113
key={key}
@@ -117,6 +118,7 @@ export class Maps extends Component<Props, State> {
117118
pinColor={props.iconColor || this.styles.marker.color}
118119
opacity={this.styles.marker.opacity}
119120
>
121+
{isFilled ? null : <Callout tooltip />}
120122
{props.icon && (
121123
<Icon icon={props.icon} color={props.iconColor || this.styles.marker.color} size={props.iconSize} />
122124
)}

yarn.lock

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4509,10 +4509,10 @@ __metadata:
45094509
languageName: node
45104510
linkType: hard
45114511

4512-
"@types/geojson@npm:^7946.0.7":
4513-
version: 7946.0.10
4514-
resolution: "@types/geojson@npm:7946.0.10"
4515-
checksum: 10/12c407c2dc93ecb26c08af533ee732f1506a9b29456616ba7ba1d525df96206c28ddf44a528f6a5415d7d22893e9d967420940a9c095ee5e539c1eba5fefc1f4
4512+
"@types/geojson@npm:^7946.0.13":
4513+
version: 7946.0.14
4514+
resolution: "@types/geojson@npm:7946.0.14"
4515+
checksum: 10/ae511bee6488ae3bd5a3a3347aedb0371e997b14225b8983679284e22fa4ebd88627c6e3ff8b08bf4cc35068cb29310c89427311ffc9322c255615821a922e71
45164516
languageName: node
45174517
linkType: hard
45184518

@@ -7633,7 +7633,7 @@ __metadata:
76337633
languageName: node
76347634
linkType: hard
76357635

7636-
"deprecated-react-native-prop-types@npm:^2.2.0, deprecated-react-native-prop-types@npm:^2.3.0":
7636+
"deprecated-react-native-prop-types@npm:^2.2.0":
76377637
version: 2.3.0
76387638
resolution: "deprecated-react-native-prop-types@npm:2.3.0"
76397639
dependencies:
@@ -12297,7 +12297,7 @@ __metadata:
1229712297
eslint: "npm:^7.20.0"
1229812298
prop-types: "npm:^15.7.2"
1229912299
react-native-geocoder: "npm:0.5.0"
12300-
react-native-maps: "npm:0.31.1"
12300+
react-native-maps: "npm:1.14.0"
1230112301
languageName: unknown
1230212302
linkType: soft
1230312303

@@ -15358,20 +15358,19 @@ __metadata:
1535815358
languageName: node
1535915359
linkType: hard
1536015360

15361-
"react-native-maps@npm:0.31.1":
15362-
version: 0.31.1
15363-
resolution: "react-native-maps@npm:0.31.1"
15361+
"react-native-maps@npm:1.14.0":
15362+
version: 1.14.0
15363+
resolution: "react-native-maps@npm:1.14.0"
1536415364
dependencies:
15365-
"@types/geojson": "npm:^7946.0.7"
15366-
deprecated-react-native-prop-types: "npm:^2.3.0"
15365+
"@types/geojson": "npm:^7946.0.13"
1536715366
peerDependencies:
15368-
react: ">= 16.0"
15369-
react-native: ">= 0.51"
15367+
react: ">= 17.0.1"
15368+
react-native: ">= 0.64.3"
1537015369
react-native-web: ">= 0.11"
1537115370
peerDependenciesMeta:
1537215371
react-native-web:
1537315372
optional: true
15374-
checksum: 10/ee324e77d597dcb9334ea9579b2a15f7a9f84b1bd86a7860eb7c59b0c686b9494ed0887ec3f3448d05dc2200b68d2496dd0832439a247f79d7516b83ff94506c
15373+
checksum: 10/1059b1db941a85fe984cb9220a5d72623dd9c745cecb9591dc2b069cadbe1404c650464df9cc1efe482333faa3dce4782a84de087361804e80fd124e8e36c9bf
1537515374
languageName: node
1537615375
linkType: hard
1537715376

0 commit comments

Comments
 (0)