Skip to content

Commit

Permalink
Added additional route planners
Browse files Browse the repository at this point in the history
Added support for HERE WeGo (destination and follow route)
Added support for Sygic (destination and follow route)
  • Loading branch information
Sp3EdeR committed Jan 25, 2024
1 parent 5d1ba48 commit a3c4cbc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<link rel="stylesheet" href="res/huroutes.css" />
<script src="res/huroutes.js"></script>
<script>
const phoneRouterOnly = 'Ez a tervező csak a telefonos applikációval működik.';
// huroutes requires that the language dictionary is provided here
// The huroutes.lang.<html[lang]> attribute field must be filled in
huroutes.lang.hu = {
Expand All @@ -84,10 +85,16 @@
'navToPoi': ' Navigáció <span class="nav-start">ehhez a helyhez</span>.',
'sharePoi': 'Hely <span class="share">megosztása</span>.',
'nav': {
'Google follow route': 'Google útvonal követés'
'Google follow route': 'Google útvonal követés',
'HERE WeGo follow route': 'HERE WeGo útvonal követés',
'Sygic follow route': 'Sygic útvonal követés'
},
'nav-label': {
'Google follow route': 'Hosszabb útvonalak esetén előfordulhat pontatlan tervezés.'
'Google follow route': 'Hosszabb útvonalak esetén előfordulhat pontatlan tervezés.',
'HERE WeGo': phoneRouterOnly,
'HERE WeGo follow route': phoneRouterOnly,
'Sygic': phoneRouterOnly,
'Sygic follow route': phoneRouterOnly
},
'navLength': 'Az útvonal hossza.',
'navStartTooltip': 'Navigálás az útvonal elejére.',
Expand Down Expand Up @@ -148,7 +155,7 @@ <h2 class="title">huroutes</h2>

<!-- The options dialog -->
<div class="modal fade" id="options-dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h3>Beállítások</h3>
Expand Down
28 changes: 28 additions & 0 deletions res/huroutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,34 @@ const huroutes = {
return link.format(dst.lat, dst.lng);
},
'waypoints': 0
},
'HERE WeGo': {
'getLink': dst => {
const link = 'https://share.here.com/g/{0},{1}?m=d';
return link.format(dst.lat, dst.lng);
},
'waypoints': 0
},
'HERE WeGo follow route': {
'getLink': (dst, wpts) => {
const link = 'https://share.here.com/g/{0}/{1},{2}?m=d';
return link.format(wpts.map(c => c.lat + ',' + c.lng).join('/'), dst.lat, dst.lng);
},
'waypoints': 15 // The starting location and destination are not part of this.
},
'Sygic': {
'getLink': dst => {
const link = 'https://go.sygic.com/directions?to={0},{1}&mode=car';
return link.format(dst.lat, dst.lng);
},
'waypoints': 0
},
'Sygic follow route': {
'getLink': (dst, wpts) => {
const link = 'https://go.sygic.com/directions?to={0},{1}{2}&mode=car';
return link.format(dst.lat, dst.lng, wpts.map(c => '&via[]={0},{1}'.format(c.lat, c.lng)).join(''));
},
'waypoints': 15
}
},
// Route path data download formats.
Expand Down

0 comments on commit a3c4cbc

Please sign in to comment.