react-native-map-link 2.9.1 → 2.9.4
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/package.json +1 -1
- package/src/constants.js +3 -0
- package/src/images/petalmaps.png +0 -0
- package/src/index.js +10 -3
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/package.json
CHANGED
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
|
@@ -122,7 +122,7 @@ export async function showLocation(options) {
|
|
|
122
122
|
url = prefixes['apple-maps'];
|
|
123
123
|
url = useSourceDestiny
|
|
124
124
|
? `${url}?saddr=${sourceLatLng}&daddr=${latlng}`
|
|
125
|
-
: `${url}?
|
|
125
|
+
: `${url}?ll=${latlng}`;
|
|
126
126
|
url += `&q=${title ? encodedTitle : 'Location'}`;
|
|
127
127
|
url += appleDirectionMode ? `&dirflg=${appleDirectionMode}` : '';
|
|
128
128
|
break;
|
|
@@ -198,10 +198,10 @@ export async function showLocation(options) {
|
|
|
198
198
|
}
|
|
199
199
|
break;
|
|
200
200
|
case 'truckmap':
|
|
201
|
-
url = `
|
|
201
|
+
url = `https://truckmap.com/place/${lat},${lng}`;
|
|
202
202
|
|
|
203
203
|
if (useSourceDestiny) {
|
|
204
|
-
url = `
|
|
204
|
+
url = `https://truckmap.com/route/${sourceLat},${sourceLng}/${lat},${lng}`;
|
|
205
205
|
}
|
|
206
206
|
break;
|
|
207
207
|
case 'waze':
|
|
@@ -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) {
|