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 CHANGED
@@ -24,6 +24,7 @@ const schemes = [
24
24
  'lftgpas',
25
25
  'petalmaps',
26
26
  'sygic',
27
+ 'here-route',
27
28
  ];
28
29
 
29
30
  const intents = ['geo', 'waze'].map((app) => {
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-map-link",
3
- "version": "3.8.0",
3
+ "version": "3.9.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",