react-native-map-link 3.8.0 → 3.9.0
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/app.plugin.js +1 -0
- package/lib/constants.js +3 -0
- package/lib/images/here.png +0 -0
- package/lib/type.d.ts +1 -1
- package/lib/utils.js +10 -0
- package/package.json +1 -1
package/app.plugin.js
CHANGED
package/lib/constants.js
CHANGED
|
@@ -28,6 +28,7 @@ const generatePrefixes = ({ alwaysIncludeGoogle, naverCallerName, }) => {
|
|
|
28
28
|
liftago: 'lftgpas://',
|
|
29
29
|
petalmaps: 'petalmaps://',
|
|
30
30
|
sygic: 'com.sygic.aura://',
|
|
31
|
+
here: 'here-route://',
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
exports.generatePrefixes = generatePrefixes;
|
|
@@ -62,6 +63,7 @@ const generateTitles = (titles) => {
|
|
|
62
63
|
liftago: 'Liftago',
|
|
63
64
|
petalmaps: 'Petal Maps',
|
|
64
65
|
sygic: 'Sygic',
|
|
66
|
+
here: 'Here We Go',
|
|
65
67
|
...(titles || {}),
|
|
66
68
|
};
|
|
67
69
|
};
|
|
@@ -90,6 +92,7 @@ exports.icons = {
|
|
|
90
92
|
liftago: require('./images/liftago.png'),
|
|
91
93
|
petalmaps: require('./images/petalmaps.png'),
|
|
92
94
|
sygic: require('./images/sygic.png'),
|
|
95
|
+
here: require('./images/here.png'),
|
|
93
96
|
};
|
|
94
97
|
exports.appKeys = Object.keys(exports.icons);
|
|
95
98
|
exports.colorsPopup = {
|
|
Binary file
|
package/lib/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageSourcePropType } from 'react-native';
|
|
2
2
|
/** id for map application. this is the id that is passed to the `app` option */
|
|
3
|
-
export type MapId = 'apple-maps' | 'google-maps' | 'citymapper' | 'uber' | 'lyft' | 'transit' | 'truckmap' | 'waze' | 'yandex' | 'moovit' | 'yandex-maps' | 'yandex-taxi' | 'kakaomap' | 'tmap' | 'mapycz' | 'maps-me' | 'osmand' | 'gett' | 'navermap' | 'dgis' | 'liftago' | 'petalmaps' | 'sygic';
|
|
3
|
+
export type MapId = 'apple-maps' | 'google-maps' | 'citymapper' | 'uber' | 'lyft' | 'transit' | 'truckmap' | 'waze' | 'yandex' | 'moovit' | 'yandex-maps' | 'yandex-taxi' | 'kakaomap' | 'tmap' | 'mapycz' | 'maps-me' | 'osmand' | 'gett' | 'navermap' | 'dgis' | 'liftago' | 'petalmaps' | 'sygic' | 'here';
|
|
4
4
|
export type DirectionMode = 'car' | 'walk' | 'public-transport' | 'bike';
|
|
5
5
|
/** options shared across different types */
|
|
6
6
|
export interface SharedOptions {
|
package/lib/utils.js
CHANGED
|
@@ -438,6 +438,16 @@ const generateMapUrl = ({ app, directionsMode, appleIgnoreLatLon, googleForceLat
|
|
|
438
438
|
}
|
|
439
439
|
url += sygicDirectionsMode ? `${sygicDirectionsMode}` : '';
|
|
440
440
|
break;
|
|
441
|
+
case 'here':
|
|
442
|
+
// the prefix "here-route://" is defined in the constants.ts file but Here recommends using the https-address for deep links
|
|
443
|
+
// so here-route:// is used only to detect if the app is installed and the https url is used for linking
|
|
444
|
+
if (address) {
|
|
445
|
+
url = `https://share.here.com/r/${sourceLat && sourceLng ? `${sourceLat},${sourceLng}/` : ''}${lat},${lng},${address}?m=d`;
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
url = `https://share.here.com/r/${sourceLat && sourceLng ? `${sourceLat},${sourceLng}/` : ''}${lat},${lng}?m=d`;
|
|
449
|
+
}
|
|
450
|
+
break;
|
|
441
451
|
}
|
|
442
452
|
return url;
|
|
443
453
|
};
|