react-native-map-link 3.10.1 → 3.11.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/README.md +1 -0
- package/app.plugin.js +1 -0
- package/lib/constants.js +3 -0
- package/lib/images/tomtomgo.png +0 -0
- package/lib/type.d.ts +1 -1
- package/lib/utils.js +8 -0
- package/package.json +2 -2
package/README.md
CHANGED
package/app.plugin.js
CHANGED
package/lib/constants.js
CHANGED
|
@@ -29,6 +29,7 @@ const generatePrefixes = ({ alwaysIncludeGoogle, naverCallerName, }) => {
|
|
|
29
29
|
petalmaps: 'petalmaps://',
|
|
30
30
|
sygic: 'com.sygic.aura://',
|
|
31
31
|
here: 'here-route://',
|
|
32
|
+
tomtomgo: 'tomtomgo://',
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
35
|
exports.generatePrefixes = generatePrefixes;
|
|
@@ -64,6 +65,7 @@ const generateTitles = (titles) => {
|
|
|
64
65
|
petalmaps: 'Petal Maps',
|
|
65
66
|
sygic: 'Sygic',
|
|
66
67
|
here: 'Here We Go',
|
|
68
|
+
tomtomgo: 'TomTom GO',
|
|
67
69
|
...(titles || {}),
|
|
68
70
|
};
|
|
69
71
|
};
|
|
@@ -93,6 +95,7 @@ exports.icons = {
|
|
|
93
95
|
petalmaps: require('./images/petalmaps.png'),
|
|
94
96
|
sygic: require('./images/sygic.png'),
|
|
95
97
|
here: require('./images/here.png'),
|
|
98
|
+
tomtomgo: require('./images/tomtomgo.png'),
|
|
96
99
|
};
|
|
97
100
|
exports.appKeys = Object.keys(exports.icons);
|
|
98
101
|
exports.colorsPopup = {
|
|
Binary file
|
package/lib/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageRequireSource } 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' | 'here';
|
|
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' | 'tomtomgo';
|
|
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
|
@@ -448,6 +448,14 @@ const generateMapUrl = ({ app, directionsMode, appleIgnoreLatLon, googleForceLat
|
|
|
448
448
|
url = `https://share.here.com/r/${sourceLat && sourceLng ? `${sourceLat},${sourceLng}/` : ''}${lat},${lng}?m=d`;
|
|
449
449
|
}
|
|
450
450
|
break;
|
|
451
|
+
case 'tomtomgo':
|
|
452
|
+
if (address) {
|
|
453
|
+
throw new MapsException('tomtomgo does not support passing the address or has not been implemented yet.');
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
url = `${prefixes.tomtomgo}x-callback-url/navigate?destination=${latlng}`;
|
|
457
|
+
}
|
|
458
|
+
break;
|
|
451
459
|
}
|
|
452
460
|
return url;
|
|
453
461
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-map-link",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Open the map app of the user's choice with a specific location.",
|
|
5
5
|
"source": "src/index",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react": "^18.2.0",
|
|
66
66
|
"react-native": "^0.73.4",
|
|
67
67
|
"react-native-typescript-transformer": "^1.2.13",
|
|
68
|
-
"semantic-release": "^
|
|
68
|
+
"semantic-release": "^25.0.2",
|
|
69
69
|
"ts-jest": "^29.1.2",
|
|
70
70
|
"typescript": "^5.3.3"
|
|
71
71
|
},
|