Skip to content

Commit a3c4cbc

Browse files
committed
Added additional route planners
Added support for HERE WeGo (destination and follow route) Added support for Sygic (destination and follow route)
1 parent 5d1ba48 commit a3c4cbc

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

index.html

+10-3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<link rel="stylesheet" href="res/huroutes.css" />
6161
<script src="res/huroutes.js"></script>
6262
<script>
63+
const phoneRouterOnly = 'Ez a tervező csak a telefonos applikációval működik.';
6364
// huroutes requires that the language dictionary is provided here
6465
// The huroutes.lang.<html[lang]> attribute field must be filled in
6566
huroutes.lang.hu = {
@@ -84,10 +85,16 @@
8485
'navToPoi': ' Navigáció <span class="nav-start">ehhez a helyhez</span>.',
8586
'sharePoi': 'Hely <span class="share">megosztása</span>.',
8687
'nav': {
87-
'Google follow route': 'Google útvonal követés'
88+
'Google follow route': 'Google útvonal követés',
89+
'HERE WeGo follow route': 'HERE WeGo útvonal követés',
90+
'Sygic follow route': 'Sygic útvonal követés'
8891
},
8992
'nav-label': {
90-
'Google follow route': 'Hosszabb útvonalak esetén előfordulhat pontatlan tervezés.'
93+
'Google follow route': 'Hosszabb útvonalak esetén előfordulhat pontatlan tervezés.',
94+
'HERE WeGo': phoneRouterOnly,
95+
'HERE WeGo follow route': phoneRouterOnly,
96+
'Sygic': phoneRouterOnly,
97+
'Sygic follow route': phoneRouterOnly
9198
},
9299
'navLength': 'Az útvonal hossza.',
93100
'navStartTooltip': 'Navigálás az útvonal elejére.',
@@ -148,7 +155,7 @@ <h2 class="title">huroutes</h2>
148155

149156
<!-- The options dialog -->
150157
<div class="modal fade" id="options-dialog" tabindex="-1">
151-
<div class="modal-dialog">
158+
<div class="modal-dialog modal-dialog-scrollable">
152159
<div class="modal-content">
153160
<div class="modal-header">
154161
<h3>Beállítások</h3>

res/huroutes.js

+28
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,34 @@ const huroutes = {
7878
return link.format(dst.lat, dst.lng);
7979
},
8080
'waypoints': 0
81+
},
82+
'HERE WeGo': {
83+
'getLink': dst => {
84+
const link = 'https://share.here.com/g/{0},{1}?m=d';
85+
return link.format(dst.lat, dst.lng);
86+
},
87+
'waypoints': 0
88+
},
89+
'HERE WeGo follow route': {
90+
'getLink': (dst, wpts) => {
91+
const link = 'https://share.here.com/g/{0}/{1},{2}?m=d';
92+
return link.format(wpts.map(c => c.lat + ',' + c.lng).join('/'), dst.lat, dst.lng);
93+
},
94+
'waypoints': 15 // The starting location and destination are not part of this.
95+
},
96+
'Sygic': {
97+
'getLink': dst => {
98+
const link = 'https://go.sygic.com/directions?to={0},{1}&mode=car';
99+
return link.format(dst.lat, dst.lng);
100+
},
101+
'waypoints': 0
102+
},
103+
'Sygic follow route': {
104+
'getLink': (dst, wpts) => {
105+
const link = 'https://go.sygic.com/directions?to={0},{1}{2}&mode=car';
106+
return link.format(dst.lat, dst.lng, wpts.map(c => '&via[]={0},{1}'.format(c.lat, c.lng)).join(''));
107+
},
108+
'waypoints': 15
81109
}
82110
},
83111
// Route path data download formats.

0 commit comments

Comments
 (0)