diff --git a/README.md b/README.md index 93c622b..4acdb32 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ on their device. The app supports Apple Maps, Google Maps, Citymapper, Uber, and - Petal Maps - `petalmaps` (Android only) - Sygic - `sygic` - TomTom GO - `tomtomgo` (IOS only) +- DashTag Maps - `dashtagmaps` @@ -86,6 +87,7 @@ Just add this in your `Info.plist` depending on which apps you'd like to support dgis lftgpas sygic + dashtagmaps ``` diff --git a/app.plugin.js b/app.plugin.js index 7b314e0..3b12907 100644 --- a/app.plugin.js +++ b/app.plugin.js @@ -26,6 +26,7 @@ const schemes = [ 'petalmaps', 'sygic', 'here-route', + 'dashtagmaps', ]; const intents = ['geo', 'waze'].map((app) => { diff --git a/src/constants.ts b/src/constants.ts index ceb48ea..9d56719 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -36,6 +36,7 @@ export const generatePrefixes = ({ sygic: 'com.sygic.aura://', here: 'here-route://', tomtomgo: 'tomtomgo://', + dashtagmaps: 'dashtagmaps://', }; }; @@ -74,6 +75,7 @@ export const generateTitles = ( sygic: 'Sygic', here: 'Here We Go', tomtomgo: 'TomTom GO', + dashtagmaps: 'DashTag Maps', ...(titles || {}), }; }; @@ -104,6 +106,7 @@ export const icons: Record = { sygic: require('./images/sygic.png'), here: require('./images/here.png'), tomtomgo: require('./images/tomtomgo.png'), + dashtagmaps: require('./images/dashtagmaps.png'), }; export const appKeys: string[] = Object.keys(icons); diff --git a/src/images/dashtagmaps.png b/src/images/dashtagmaps.png new file mode 100644 index 0000000..b0615b7 Binary files /dev/null and b/src/images/dashtagmaps.png differ diff --git a/src/type.ts b/src/type.ts index 0c49ed8..ab195eb 100644 --- a/src/type.ts +++ b/src/type.ts @@ -26,7 +26,8 @@ export type MapId = | 'petalmaps' | 'sygic' | 'here' - | 'tomtomgo'; + | 'tomtomgo' + | 'dashtagmaps'; export type DirectionMode = 'car' | 'walk' | 'public-transport' | 'bike'; diff --git a/src/utils.ts b/src/utils.ts index 7434466..f4f859f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -576,6 +576,20 @@ export const generateMapUrl = ({ url = `${prefixes.tomtomgo}x-callback-url/navigate?destination=${latlng}`; } break; + case 'dashtagmaps': + if (address) { + throw new MapsException( + 'dashtagmaps does not support passing the address or has not been implemented yet.', + ); + } else { + const waypointName = title ? encodedTitle : 'Destination'; + if (useSourceDestiny) { + url = `${prefixes.dashtagmaps}navigate?waypoints=${sourceLat},${sourceLng},Start|${lat},${lng},${waypointName}`; + } else { + url = `${prefixes.dashtagmaps}navigate?lat=${lat}&lon=${lng}&title=${waypointName}`; + } + } + break; } return url;