Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional route planners #177

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading