react-native-map-link 2.8.3 → 2.9.2
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.
- package/README.md +5 -0
- package/index.d.ts +1 -1
- package/package.json +14 -11
- package/src/constants.js +3 -0
- package/src/images/petalmaps.png +0 -0
- package/src/index.js +7 -0
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ on their device. The app supports Apple Maps, Google Maps, Citymapper, Uber, and
|
|
|
32
32
|
- Naver Map - `navermap`
|
|
33
33
|
- 2GIS - `dgis`
|
|
34
34
|
- Liftago - `liftago`
|
|
35
|
+
- Petal Maps - `petalmaps` (Android only)
|
|
35
36
|
|
|
36
37
|
</details>
|
|
37
38
|
|
|
@@ -184,6 +185,10 @@ You can do so by coping the `<queries>` statement below, and pasting it in the t
|
|
|
184
185
|
<action android:name="android.intent.action.VIEW" />
|
|
185
186
|
<data android:scheme="lftgpas" />
|
|
186
187
|
</intent>
|
|
188
|
+
<intent>
|
|
189
|
+
<action android:name="android.intent.action.VIEW" />
|
|
190
|
+
<data android:scheme="petalmaps" />
|
|
191
|
+
</intent>
|
|
187
192
|
</queries>
|
|
188
193
|
```
|
|
189
194
|
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-map-link",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Open the map app of the user's choice with a specific location",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -28,22 +28,25 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/includable/react-native-map-link#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"prop-types": "^15.
|
|
32
|
-
"react-native-modal": "^
|
|
31
|
+
"prop-types": "^15.8.1",
|
|
32
|
+
"react-native-modal": "^13.0.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=16.8.0",
|
|
36
36
|
"react-native": ">=0.40.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "^7.
|
|
40
|
-
"@babel/
|
|
41
|
-
"@
|
|
42
|
-
"babel
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"jest": "^
|
|
45
|
-
"
|
|
46
|
-
"
|
|
39
|
+
"@babel/core": "^7.17.5",
|
|
40
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
41
|
+
"@babel/eslint-plugin": "^7.16.5",
|
|
42
|
+
"@babel/runtime": "^7.17.2",
|
|
43
|
+
"@react-native-community/eslint-config": "^3.0.1",
|
|
44
|
+
"babel-jest": "^27.5.1",
|
|
45
|
+
"eslint": "^8.10.0",
|
|
46
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
47
|
+
"jest": "^27.5.1",
|
|
48
|
+
"metro-react-native-babel-preset": "^0.69.0",
|
|
49
|
+
"react-native": "^0.67.3"
|
|
47
50
|
},
|
|
48
51
|
"jest": {
|
|
49
52
|
"preset": "react-native",
|
package/src/constants.js
CHANGED
|
@@ -28,6 +28,7 @@ export function generatePrefixes(options) {
|
|
|
28
28
|
navermap: options.naverCallerName ? 'nmap://' : 'nmap-disabled://',
|
|
29
29
|
dgis: 'dgis://2gis.ru/',
|
|
30
30
|
liftago: 'lftgpas://',
|
|
31
|
+
petalmaps: 'petalmaps://',
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -59,6 +60,7 @@ export function generateTitles(titles) {
|
|
|
59
60
|
navermap: 'Naver Map',
|
|
60
61
|
dgis: '2GIS',
|
|
61
62
|
liftago: 'Liftago',
|
|
63
|
+
petalmaps: 'Petal Maps',
|
|
62
64
|
...(titles || {}),
|
|
63
65
|
};
|
|
64
66
|
}
|
|
@@ -84,6 +86,7 @@ export const icons = {
|
|
|
84
86
|
navermap: require('./images/naver-map.png'),
|
|
85
87
|
dgis: require('./images/dgis.png'),
|
|
86
88
|
liftago: require('./images/liftago.png'),
|
|
89
|
+
petalmaps: require('./images/petalmaps.png'),
|
|
87
90
|
};
|
|
88
91
|
|
|
89
92
|
export const appKeys = Object.keys(icons);
|
|
Binary file
|
package/src/index.js
CHANGED
|
@@ -286,6 +286,13 @@ export async function showLocation(options) {
|
|
|
286
286
|
url += `&pickupLat=${sourceLat}&pickupLon=${sourceLng}`;
|
|
287
287
|
}
|
|
288
288
|
break;
|
|
289
|
+
case 'petalmaps':
|
|
290
|
+
url = `${prefixes.petalmaps}navigation?daddr=${lat},${lng}`;
|
|
291
|
+
|
|
292
|
+
if (useSourceDestiny) {
|
|
293
|
+
url += `&saddr=${sourceLat},${sourceLng}`;
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
289
296
|
}
|
|
290
297
|
|
|
291
298
|
if (url) {
|