Merge lp:~costales/unav/0.60-simple-code into lp:unav

Proposed by costales
Status: Merged
Merged at revision: 74
Proposed branch: lp:~costales/unav/0.60-simple-code
Merge into: lp:unav
Prerequisite: lp:~costales/unav/0.60-offline-tiles
Diff against target: 1441 lines (+555/-256) (has conflicts)
8 files modified
nav/class/Navigator.js (+3/-3)
nav/class/UI.js (+12/-14)
nav/class/WebAPI.js (+26/-19)
nav/index.html (+125/-168)
nav/locales/unav.pot (+221/-24)
qml/AboutPage.qml (+1/-23)
qml/Main.qml (+76/-5)
qml/components/NotificationBar.qml (+91/-0)
Text conflict in nav/class/UI.js
Text conflict in nav/index.html
Text conflict in nav/locales/unav.pot
Text conflict in qml/Main.qml
Text conflict in qml/components/NotificationBar.qml
To merge this branch: bzr merge lp:~costales/unav/0.60-simple-code
Reviewer Review Type Date Requested Status
uNav developers Pending
Review via email: mp+296718@code.launchpad.net

Commit message

Added calculating route status because 'searching' flag is n...
Rework error web API
Rework no confirm route
No donation btn
Bug 1/15 pos doesn't exits anymore
Recalculate if API error
i18n updated
Message looking for position when user clicks center
Remove decimals from lat,lng in another way. If not, the coo...
Large font for info msg and hide if click fast on map
Msgs for more intuitive simulation process
Added log for check denied
Removed check accuracy
No maximumAge (testing purpose)
Securize all GPS data
Allow double click for zooming
Allow wheel mouse for zooming (check this on phone)
Redefine distance for zoom near
Speak voice before high zoom
Removed timer auto confirm route in X seconds
Remove timer for gps died
Max zoom 19
BG image for map

To post a comment you must log in.
lp:~costales/unav/0.60-simple-code updated
137. By costales

No panel if calculating state

138. By costales

If no out of route, recalc after more time

139. By costales

Set different messages for API error

140. By costales

preload none for audio

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nav/class/Navigator.js'
2--- nav/class/Navigator.js 2016-05-11 17:09:31 +0000
3+++ nav/class/Navigator.js 2016-06-13 21:48:55 +0000
4@@ -77,8 +77,8 @@
5 if (lat === null || lng === null)
6 return;
7
8- this.pos_now['lat'] = lat;
9- this.pos_now['lng'] = lng;
10+ this.pos_now['lat'] = parseFloat(lat.toFixed(5));
11+ this.pos_now['lng'] = parseFloat(lng.toFixed(5));
12 this.accuracy = parseInt(accu);
13 this.speed = this.maths.speed2human(speed);
14 }
15@@ -656,7 +656,7 @@
16 this.set_route_status('out');
17 return;
18 }
19-
20+
21 // Ended?
22 if (this.nearest['indication'] >= 4 && this.nearest['indication'] <= 6 && this.nearest['dist2turn'] <= (this.DIST4INDICATION/2)) {
23 this.set_route_status('ended');
24
25=== modified file 'nav/class/UI.js'
26--- nav/class/UI.js 2016-06-08 17:14:51 +0000
27+++ nav/class/UI.js 2016-06-13 21:48:55 +0000
28@@ -101,23 +101,16 @@
29
30 this.scaleline = new ol.control.ScaleLine();
31 this.map.addControl(this.scaleline);
32-
33- // Disable zoom events: Bug https://goo.gl/hxDwa3
34- var interactions = this.map.getInteractions().getArray();
35- var inte1 = interactions.filter(function(interaction) {
36- return interaction instanceof ol.interaction.DoubleClickZoom;
37- })[0];
38- var inte2 = interactions.filter(function(interaction) {
39- return interaction instanceof ol.interaction.MouseWheelZoom;
40- })[0];
41- inte1.setActive(false);
42- inte2.setActive(false);
43 }
44
45 UI.prototype.ZOOM_CITY = 17;
46 UI.prototype.ZOOM_HIGHWAY = 16;
47 UI.prototype.ZOOM_POI = 17;
48+<<<<<<< TREE
49 UI.prototype.LONG_TRACK_HIGHWAY = 2000;
50+=======
51+UI.prototype.LONG_TRACK_HIGHWAY = 850;
52+>>>>>>> MERGE-SOURCE
53 UI.prototype.DIST4ROTATION = 3;
54 UI.prototype.SPEED4ROTATION = 5;
55 UI.prototype.COLOR_ORANGE = '#DD4814';
56@@ -271,7 +264,7 @@
57 this.map.getView().setZoom(this.ZOOM_CITY); // City
58 }
59 else {
60- if (!radar && dist2turn > this.LONG_TRACK_HIGHWAY && dist_track_done > (this.LONG_TRACK_HIGHWAY/3))
61+ if (!radar && dist2turn > this.LONG_TRACK_HIGHWAY && dist_track_done > this.LONG_TRACK_HIGHWAY)
62 this.map.getView().setZoom(this.ZOOM_HIGHWAY - 3); // Highway special zoom
63 else
64 this.map.getView().setZoom(this.ZOOM_HIGHWAY); // Highway
65@@ -387,6 +380,7 @@
66 break;
67 case 'calc':
68 case 'calc_from_out':
69+ case 'calculating':
70 $('#p_msg').html(t("Searching for a route…"));
71 $('#panel_msg').show();
72 break;
73@@ -395,7 +389,7 @@
74 $('#panel_msg').show();
75 break;
76 case 'errorAPI':
77- $('#p_msg').html(t("Error finding route between points. Check the connection and try again"));
78+ $('#p_msg').html(t("Trying search again soon…"));
79 $('#panel_msg').show();
80 break;
81 case 'out':
82@@ -502,13 +496,16 @@
83 }
84 }
85
86+<<<<<<< TREE
87 UI.prototype.KO_API_radars = function() {
88 qml_show_notification('warning', 'speed_camera_error')
89 }
90
91+=======
92+>>>>>>> MERGE-SOURCE
93 UI.prototype.map_height = function() {
94 // car + route = car on bottom
95- if (this.map_stretched && this.settings.get_routing_mode() != 1 && (this.nav.get_route_status() == 'yes' || this.nav.get_route_status() == 'out' || this.nav.get_route_status() == 'calc_from_out')) {
96+ if (this.map_stretched && this.settings.get_routing_mode() != 1 && this.nav.get_route_status() == 'yes') {
97 var aux_height = 0;
98 if ($('#panel_summary').is(':visible'))
99 aux_height = aux_height + $('#panel_summary').height();
100@@ -577,6 +574,7 @@
101 case 'drawing':
102 case 'calc':
103 case 'calc_from_out':
104+ case 'calculating':
105 case 'out':
106 if (speed > this.SPEED4ROTATION) {
107 var dist = geolib.getDistance(
108
109=== modified file 'nav/class/WebAPI.js'
110--- nav/class/WebAPI.js 2016-04-14 20:18:01 +0000
111+++ nav/class/WebAPI.js 2016-06-13 21:48:55 +0000
112@@ -18,7 +18,6 @@
113 this.ui = ui;
114 this.settings = settings;
115
116- this.searching = false;
117 this.route_status = '';
118 this.t_prev = $.now() - 1;
119 }
120@@ -26,14 +25,18 @@
121
122 // Route
123 WebAPI.prototype.set_route = function(lat1, lng1, lat2, lng2) {
124- if (this.searching)
125+ if (this.nav.get_route_status() == 'calculating')
126 return;
127
128 if (this.t_prev < $.now()) { // Avoid several calls in a small time
129- this.t_prev = $.now() + 7000;
130-
131- this.searching = true;
132+
133+ if (this.nav.get_route_status() == "errorAPI") // Avoid so many calls
134+ this.t_prev = $.now() + 55000;
135+ else
136+ this.t_prev = $.now() + 8000;
137+
138 this.route_status = this.nav.get_route_status();
139+ this.nav.set_route_status('calculating');
140
141 // API parameters
142 var avoid_tolls = '';
143@@ -58,7 +61,7 @@
144 api_key: 'valhalla-4DcFzeQ' // TODO debug
145 },
146 dataType: 'json',
147- timeout: 50000,
148+ timeout: 40000,
149 success: this.OK_callback_set_route.bind(this),
150 error: this.KO_callback_set_route.bind()
151 });
152@@ -67,8 +70,6 @@
153 }
154
155 WebAPI.prototype.OK_callback_set_route = function(data) {
156- this.searching = false;
157-
158 if (this.nav.get_route_status() == 'no') // Stop route if users canceled between calculation
159 return;
160
161@@ -81,23 +82,29 @@
162 gps_loop(this.nav.get_route_status()); // Show route = Avoid wait for GPS
163 }
164 else {
165- if (this.route_status == 'calc_from_out')
166- this.nav.set_route_status('calc_from_out'); // recalculate
167- else
168+ if (this.route_status == 'calc_from_out') { // recalculate
169+ this.nav.set_route_status('calc_from_out');
170+ qml_show_notification('critical', 'calcfromout_error');
171+ }
172+ else {
173 this.nav.set_route_status('errorAPI');
174+ qml_show_notification('critical', 'webapi_error');
175+ }
176 }
177 }
178
179 WebAPI.prototype.KO_callback_set_route = function() {
180- this.searching = false;
181-
182 if (this.nav.get_route_status() == 'no') // Stop route if users canceled between calculation
183 return;
184
185- if (this.route_status == 'calc_from_out')
186- this.nav.set_route_status('calc_from_out'); // recalculate
187- else
188+ if (this.route_status == 'calc_from_out') { // recalculate
189+ this.nav.set_route_status('calc_from_out');
190+ qml_show_notification('critical', 'calcfromout_error');
191+ }
192+ else {
193 this.nav.set_route_status('errorAPI');
194+ qml_show_notification('critical', 'webapi_error');
195+ }
196 }
197
198
199@@ -126,7 +133,7 @@
200 api_key: 'valhalla-4DcFzeQ' // TODO debug
201 },
202 dataType: 'json',
203- timeout: 50000,
204+ timeout: 40000,
205 success: this.OK_callback_simulate.bind(this),
206 error: this.KO_callback_simulate.bind()
207 });
208@@ -268,7 +275,7 @@
209 var poly_box = '(poly:\"' + routeBoundaryPolygon_1 + routeBoundaryPolygon_2 + '\");out;'
210 $.ajax({
211 url: 'https://overpass-api.de/api/interpreter?data=node[highway=speed_camera]' + poly_box,
212- timeout: 50000,
213+ timeout: 55000,
214 dataType: 'xml',
215 success: this.OK_callback_set_radars.bind(this),
216 error: this.KO_callback_set_radars.bind()
217@@ -294,5 +301,5 @@
218 }
219
220 WebAPI.prototype.KO_callback_set_radars = function() {
221- this.ui.KO_API_radars();
222+ qml_show_notification('warning', 'speed_camera_error');
223 }
224
225=== modified file 'nav/index.html'
226--- nav/index.html 2016-06-08 17:14:51 +0000
227+++ nav/index.html 2016-06-13 21:48:55 +0000
228@@ -132,22 +132,6 @@
229 </section>
230 </div>
231
232- <!-- Error GPS died (?) -->
233- <div id="gps_died" style="display:none;" data-role="dialog">
234- <section>
235- <h1 data-localize="GPS device is not working">GPS device is not working</h1>
236- <p>
237- <span data-localize="The GPS device didn't return a position yet">The GPS device didn't return a position yet</span><br>
238- <span data-localize="Review the GPS device settings (check at bottom of battery settings too)">Review the GPS device settings (check at bottom of battery settings too)</span><br>
239- <span data-localize="If everything is OK, try a device reboot :( The GPS device will work again">If everything is OK, try a device reboot :( The GPS device will work again</span><br>
240- <span data-localize="It doesn't work either, please fill a bug: bugs.launchpad.net/unav">It doesn't work either, please fill a bug: bugs.launchpad.net/unav</span><br>
241- </p>
242- <menu>
243- <button id="died_gps" data-role="button" onclick="$('#gps_died').hide()" data-localize="Close">Close</button>
244- </menu>
245- </section>
246- </div>
247-
248 <!-- js -->
249 <script src="libraries/jquery.min.js"></script>
250
251@@ -233,7 +217,7 @@
252 center: ol.proj.transform([4.666389, 50.009167], 'EPSG:4326', 'EPSG:3857'),
253 zoom: 4,
254 minZoom: 1,
255- maxZoom: 20
256+ maxZoom: 19
257 })
258 });
259 </script>
260@@ -251,27 +235,81 @@
261 <script src="class/Maths.js"></script>
262 <script>
263 var settings = new Settings();
264- var maths = new Maths();
265- var nav = new Navigator(maths, lang);
266- var ui = new UI(map, nav, settings, maths, lang);
267+ var maths = new Maths();
268+ var nav = new Navigator(maths, lang);
269+ var ui = new UI(map, nav, settings, maths, lang);
270 var webapi = new WebAPI(nav, ui, settings);
271
272 // Navigation (map in review mode by default, without read GPS for not drain battery)
273 var id_gps = 0;
274- var id_auto_accept = 0;
275- var id_gps_died = 0;
276- var times_without_accuracy = -1; // Control 1st time
277+ var confirm_route = true;
278
279 function center_pos() {
280 ui.set_center_1st_pos(true);
281 ui.set_map_stretched(true);
282- if (id_gps == 0) {
283- id_gps_died = setTimeout('$("#gps_died").show();', 900000); // 15 minutes
284- var t_prev_run = $.now() - 1;
285- gps_start(t_prev_run); // GPS will run forever
286+ if (id_gps === 0) // GPS will run forever
287+ gps_start();
288+ }
289+
290+
291+ function gps_start() {
292+
293+ console.log('Starting GPS...');
294+
295+ if (!navigator.geolocation) {
296+ qml_set_center_onpos(0);
297+ $('#gps_denied').show();
298+ return;
299 }
300+
301+ /** TESTING BEGIN
302+ var route = [
303+ [43.51557,-5.655146666666667],[43.515764999999995,-5.655245000000001],[43.515955,-5.655354999999999],[43.51614333333334,-5.655476666666668],[43.51633,-5.655601666666667],[43.516515,-5.6557216666666665],[43.516695,-5.655835],[43.516871666666674,-5.655946666666667],[43.517039999999994,-5.656053333333333],[43.517208333333336,-5.6561650000000006],[43.517363333333336,-5.656270000000001],[43.517515,-5.656368333333334],[43.51765833333334,-5.656464999999999],[43.51779333333334,-5.6565666666666665],[43.51792333333333,-5.656670000000001],[43.518055000000004,-5.656765],[43.518188333333335,-5.656851666666667],[43.518323333333335,-5.656935000000001],[43.518458333333335,-5.657018333333333],[43.518591666666666,-5.657103333333334],[43.518724999999996,-5.657188333333333],[43.51885666666667,-5.657273333333334],[43.51898500000001,-5.657354999999999],[43.51910833333333,-5.6574366666666664],[43.51923,-5.657515000000001],[43.51935166666667,-5.657591666666667],[43.51946833333333,-5.657673333333334],[43.51958333333334,-5.65776],[43.51969166666666,-5.657848333333334],[43.519800000000004,-5.657933333333333],[43.519909999999996,-5.658021666666667],[43.520021666666665,-5.658115],[43.520134999999996,-5.658213333333333],[43.520224999999996,-5.658365],[43.520273333333336,-5.658556666666668],[43.520296666666674,-5.6587733333333325],[43.52031,-5.65899],[43.520329999999994,-5.659196666666666],[43.52035166666666,-5.6594],[43.52037833333334,-5.6595949999999995],[43.520405,-5.659795000000001],[43.520431666666674,-5.659996666666666],[43.52046166666667,-5.660196666666667],[43.52049999999999,-5.660386666666667],[43.52054,-5.660563333333332],[43.52058166666667,-5.660741666666667],[43.52062166666666,-5.6609266666666676],[43.52066833333333,-5.6611183333333335],[43.52072166666667,-5.661316666666666],[43.520786666666666,-5.661518333333333],[43.520865,-5.661720000000001],[43.52095333333333,-5.661916666666667],[43.521049999999995,-5.662096666666668],[43.521151666666675,-5.662258333333334],[43.52125833333333,-5.662405],[43.521363333333326,-5.662538333333333],[43.52146666666666,-5.662656666666667],[43.52155833333333,-5.662758333333333],[43.521634999999996,-5.66284],[43.52169666666667,-5.6629016666666665],[43.52174,-5.662941666666668],[43.52177,-5.66297],[43.52178833333334,-5.662984999999999],[43.52179666666666,-5.662993333333333],[43.5218,-5.6629950000000004],[43.5218,-5.662993333333333],[43.52182,-5.663011666666667],[43.52185166666666,-5.663041666666667],[43.521894999999994,-5.663076666666666],[43.521945,-5.6631149999999995],[43.52201,-5.663164999999999],[43.52208166666666,-5.663216666666667],[43.52216,-5.66327],[43.52225,-5.663326666666667],[43.52235166666666,-5.663381666666667],[43.52246333333333,-5.663433333333334],[43.52258,-5.663478333333334],[43.52269666666666,-5.663518333333333],[43.522816666666664,-5.66355],[43.52293666666666,-5.663576666666668],[43.52306,-5.663595],[43.52318166666667,-5.663603333333333],[43.523303333333324,-5.663605],[43.52342166666667,-5.663600000000001],[43.523541666666674,-5.663588333333333],[43.52366,-5.66357],[43.52378166666667,-5.663544999999999],[43.52390666666667,-5.6635133333333325],[43.52403833333333,-5.663475],[43.524175,-5.663433333333334],[43.524316666666664,-5.66339],[43.52445833333333,-5.6633466666666665],[43.52459833333334,-5.6633033333333325],[43.52474,-5.663258333333332],[43.52488166666667,-5.663213333333334],[43.52502333333334,-5.663170000000001],[43.52516833333334,-5.663128333333333],[43.525310000000005,-5.6630899999999995],[43.52545333333334,-5.663056666666667],[43.52559666666666,-5.663023333333332],[43.52574,-5.662986666666666],[43.52588333333333,-5.662945000000001],[43.52602666666667,-5.6629033333333325],[43.52617,-5.66286],[43.526309999999995,-5.662816666666667],[43.52645166666666,-5.662774999999999],[43.526595,-5.662733333333334],[43.526738333333334,-5.66269],[43.52688,-5.6626433333333335],[43.52702166666666,-5.662598333333333],[43.52716166666667,-5.662554999999999],[43.52729666666667,-5.662515],[43.52742,-5.662476666666667],[43.52753333333333,-5.662441666666666],[43.527635,-5.6624083333333335],[43.527725,-5.662374999999999],[43.52780500000001,-5.662344999999999],[43.52787,-5.662319999999999],[43.527925,-5.662303333333334],[43.52797166666666,-5.66229],[43.528009999999995,-5.662276666666666],[43.52804166666667,-5.662266666666667],[43.52806666666667,-5.662256666666667],[43.52807833333333,-5.66225],[43.52808166666667,-5.66225],[43.52808,-5.662248333333334],[43.52807833333333,-5.6622466666666655]
304+ ];
305+ var z1 = 0;
306+ id_gps = setInterval(function(){
307+ accuracy = 300;
308+ speed = 2;
309+ z1++;
310+ latitude = route[z1][0];
311+ longitude = route[z1][1];
312+ nav.set_gps_data(latitude, longitude, accuracy, speed);
313+ gps_loop(nav.get_route_status());
314+ },1000);
315+ return;
316+ TESTING END **/
317+
318+ var t_prev_run = 0;
319+ id_gps = navigator.geolocation.watchPosition(
320+ function (pos) {
321+ if (t_prev_run < $.now()) { // Device bug #1500539 There are 3 positions at the same time
322+ t_prev_run = $.now() + 450;
323+
324+ nav.set_gps_data(pos.coords.latitude, pos.coords.longitude, pos.coords.accuracy, pos.coords.speed);
325+ gps_loop(nav.get_route_status());
326+ }
327+ },
328+ function (error) {
329+ if (error.code == 1) { // Denied?
330+ console.log('GPS Denied!');
331+ navigator.geolocation.clearWatch(id_gps);
332+ id_gps = 0;
333+ nav.set_route_status('no');
334+ ui.update();
335+ ui.markers_radar_clear();
336+ ui.route(false);
337+ qml_set_center_onpos(0);
338+ $('#gps_denied').show();
339+ }
340+ },
341+ {
342+ enableHighAccuracy: true
343+ // maximumAge: 0 TODO 0.60: Uncomment, this could stops uNav (?)
344+ }
345+ );
346 }
347
348+
349 // Dragons here! The 'status' is critical in the app, it will pass for states that will determine how to work the app
350 function gps_loop(status) {
351
352@@ -279,25 +317,26 @@
353 case 'no':
354 case 'yes':
355 case 'ended':
356- case 'errorAPI':
357 case 'simulate_calculating':
358 case 'simulate_done_car':
359 case 'simulate_done_bike':
360 case 'simulate_done_walk':
361 case 'simulate_drawing':
362 case 'simulate_error':
363- break;
364 case '2review':
365- if (id_auto_accept == 0)
366- id_auto_accept = setTimeout('agree_review()', 3500);
367+ case 'calculating':
368 break;
369 case 'drawing':
370 var route_indication = nav.get_route_indication();
371+<<<<<<< TREE
372 if (id_auto_accept == 0 && ui.get_map_layer() == 0) { // No auto accept & online maps
373 if (route_indication['distance_total'] > 1000000) {
374 id_auto_accept = -1;
375+=======
376+ if (confirm_route) {
377+ if (route_indication['distance_total'] > 1000000)
378+>>>>>>> MERGE-SOURCE
379 $('#popup_longroute').show();
380- }
381 ui.set_center_onpos(false);
382 ui.set_center_1st_pos(false);
383 ui.set_zoom_unav(false);
384@@ -312,16 +351,17 @@
385 webapi.set_radars();
386 break;
387 case 'waiting4signal':
388- id_auto_accept = 0; // ask recalculating
389+ confirm_route = true;
390 nav.set_route_status('calc');
391 // Not use here break for calc route now
392 case 'calc':
393 case 'calc_from_out':
394+ case 'errorAPI':
395 var gps_data = nav.get_pos_data();
396 webapi.set_route(gps_data['now_lat'], gps_data['now_lng'], gps_data['end_lat'], gps_data['end_lng']);
397 break;
398 case 'out':
399- id_auto_accept = -2; // not ask recalculating
400+ confirm_route = false;
401 nav.set_route_status('calc_from_out');
402 break;
403 }
404@@ -332,92 +372,6 @@
405 }
406
407
408-
409- function gps_start(t_prev) {
410-
411- console.log('Starting GPS...');
412-
413- if (!navigator.geolocation) {
414- clearTimeout(id_gps_died);
415- id_gps_died = 0;
416- qml_set_center_onpos(0);
417- $('#gps_denied').show();
418- return;
419- }
420-
421- /** TESTING BEGIN
422- var route = [
423- [43.51557,-5.655146666666667],[43.515764999999995,-5.655245000000001],[43.515955,-5.655354999999999],[43.51614333333334,-5.655476666666668],[43.51633,-5.655601666666667],[43.516515,-5.6557216666666665],[43.516695,-5.655835],[43.516871666666674,-5.655946666666667],[43.517039999999994,-5.656053333333333],[43.517208333333336,-5.6561650000000006],[43.517363333333336,-5.656270000000001],[43.517515,-5.656368333333334],[43.51765833333334,-5.656464999999999],[43.51779333333334,-5.6565666666666665],[43.51792333333333,-5.656670000000001],[43.518055000000004,-5.656765],[43.518188333333335,-5.656851666666667],[43.518323333333335,-5.656935000000001],[43.518458333333335,-5.657018333333333],[43.518591666666666,-5.657103333333334],[43.518724999999996,-5.657188333333333],[43.51885666666667,-5.657273333333334],[43.51898500000001,-5.657354999999999],[43.51910833333333,-5.6574366666666664],[43.51923,-5.657515000000001],[43.51935166666667,-5.657591666666667],[43.51946833333333,-5.657673333333334],[43.51958333333334,-5.65776],[43.51969166666666,-5.657848333333334],[43.519800000000004,-5.657933333333333],[43.519909999999996,-5.658021666666667],[43.520021666666665,-5.658115],[43.520134999999996,-5.658213333333333],[43.520224999999996,-5.658365],[43.520273333333336,-5.658556666666668],[43.520296666666674,-5.6587733333333325],[43.52031,-5.65899],[43.520329999999994,-5.659196666666666],[43.52035166666666,-5.6594],[43.52037833333334,-5.6595949999999995],[43.520405,-5.659795000000001],[43.520431666666674,-5.659996666666666],[43.52046166666667,-5.660196666666667],[43.52049999999999,-5.660386666666667],[43.52054,-5.660563333333332],[43.52058166666667,-5.660741666666667],[43.52062166666666,-5.6609266666666676],[43.52066833333333,-5.6611183333333335],[43.52072166666667,-5.661316666666666],[43.520786666666666,-5.661518333333333],[43.520865,-5.661720000000001],[43.52095333333333,-5.661916666666667],[43.521049999999995,-5.662096666666668],[43.521151666666675,-5.662258333333334],[43.52125833333333,-5.662405],[43.521363333333326,-5.662538333333333],[43.52146666666666,-5.662656666666667],[43.52155833333333,-5.662758333333333],[43.521634999999996,-5.66284],[43.52169666666667,-5.6629016666666665],[43.52174,-5.662941666666668],[43.52177,-5.66297],[43.52178833333334,-5.662984999999999],[43.52179666666666,-5.662993333333333],[43.5218,-5.6629950000000004],[43.5218,-5.662993333333333],[43.52182,-5.663011666666667],[43.52185166666666,-5.663041666666667],[43.521894999999994,-5.663076666666666],[43.521945,-5.6631149999999995],[43.52201,-5.663164999999999],[43.52208166666666,-5.663216666666667],[43.52216,-5.66327],[43.52225,-5.663326666666667],[43.52235166666666,-5.663381666666667],[43.52246333333333,-5.663433333333334],[43.52258,-5.663478333333334],[43.52269666666666,-5.663518333333333],[43.522816666666664,-5.66355],[43.52293666666666,-5.663576666666668],[43.52306,-5.663595],[43.52318166666667,-5.663603333333333],[43.523303333333324,-5.663605],[43.52342166666667,-5.663600000000001],[43.523541666666674,-5.663588333333333],[43.52366,-5.66357],[43.52378166666667,-5.663544999999999],[43.52390666666667,-5.6635133333333325],[43.52403833333333,-5.663475],[43.524175,-5.663433333333334],[43.524316666666664,-5.66339],[43.52445833333333,-5.6633466666666665],[43.52459833333334,-5.6633033333333325],[43.52474,-5.663258333333332],[43.52488166666667,-5.663213333333334],[43.52502333333334,-5.663170000000001],[43.52516833333334,-5.663128333333333],[43.525310000000005,-5.6630899999999995],[43.52545333333334,-5.663056666666667],[43.52559666666666,-5.663023333333332],[43.52574,-5.662986666666666],[43.52588333333333,-5.662945000000001],[43.52602666666667,-5.6629033333333325],[43.52617,-5.66286],[43.526309999999995,-5.662816666666667],[43.52645166666666,-5.662774999999999],[43.526595,-5.662733333333334],[43.526738333333334,-5.66269],[43.52688,-5.6626433333333335],[43.52702166666666,-5.662598333333333],[43.52716166666667,-5.662554999999999],[43.52729666666667,-5.662515],[43.52742,-5.662476666666667],[43.52753333333333,-5.662441666666666],[43.527635,-5.6624083333333335],[43.527725,-5.662374999999999],[43.52780500000001,-5.662344999999999],[43.52787,-5.662319999999999],[43.527925,-5.662303333333334],[43.52797166666666,-5.66229],[43.528009999999995,-5.662276666666666],[43.52804166666667,-5.662266666666667],[43.52806666666667,-5.662256666666667],[43.52807833333333,-5.66225],[43.52808166666667,-5.66225],[43.52808,-5.662248333333334],[43.52807833333333,-5.6622466666666655]
424- ];
425- var z1 = 0;
426- id_gps = setInterval(function(){
427- if (id_gps_died != 0) {
428- clearTimeout(id_gps_died);
429- id_gps_died = 0;
430- }
431- accuracy = 300;
432- speed = 2;
433- z1++;
434- latitude = route[z1][0];
435- longitude = route[z1][1];
436- nav.set_gps_data(latitude, longitude, accuracy, speed);
437- if (accuracy <= nav.ACCU4DRIVE)
438- times_without_accuracy = 0;
439- else
440- times_without_accuracy++;
441- if (times_without_accuracy != 1)
442- gps_loop(nav.get_route_status());
443- console.log('~~~~~ '+nav.get_route_status() + ' ' + times_without_accuracy);
444- },1000);
445- return;
446- TESTING END **/
447-
448- id_gps = navigator.geolocation.watchPosition(
449- function (pos) {
450-
451- if (id_gps_died != 0) {
452- clearTimeout(id_gps_died);
453- id_gps_died = 0;
454- }
455-
456- if (t_prev < $.now() && pos.coords.latitude !== null && pos.coords.longitude !== null) { // Avoid several GPS positions in a small time #1500539 and avoid null Nexus positions
457- t_prev = $.now() + 350;
458-
459- nav.set_gps_data(pos.coords.latitude, pos.coords.longitude, pos.coords.accuracy, pos.coords.speed);
460-
461- if (pos.coords.accuracy <= nav.ACCU4DRIVE)
462- times_without_accuracy = 0;
463- else
464- times_without_accuracy++;
465-
466- if (times_without_accuracy != 1) // Hack: Ubuntu devices are losting the signal 1/15 times #1469008
467- gps_loop(nav.get_route_status());
468- }
469- },
470- function (error) {
471- if (error.code == 1) { // Denied?
472- navigator.geolocation.clearWatch(id_gps);
473- id_gps = 0;
474- if (id_auto_accept > 0) {
475- clearTimeout(id_auto_accept);
476- id_auto_accept = 0;
477- }
478- nav.set_route_status('no');
479- ui.update();
480- ui.markers_radar_clear();
481- ui.route(false);
482- qml_set_center_onpos(0);
483- $('#gps_denied').show();
484- }
485- },
486- {
487- enableHighAccuracy: true,
488- maximumAge: 0
489- }
490- );
491- }
492-
493-
494 // Map events
495 // Clicks
496 var longpress = false;
497@@ -450,6 +404,17 @@
498 !longpress ? window.location = 'http://hide_popup?' : undefined;
499 });
500
501+ map.on('dblclick', function(evt) {
502+ ui.set_zoom_unav(false); // custom zoom too
503+ if (id_gps != 0 && ui.get_center_onpos()) { // Unfocus center if GPS ON
504+ ui.set_center_onpos(false);
505+ if (ui.get_center_1st_pos())
506+ qml_set_center_onpos(2);
507+ else
508+ qml_set_center_onpos(1);
509+ }
510+ });
511+
512 map.on('pointerup', function () {
513 window.clearTimeout(longpressTimer);
514 pointerIsDown=false;
515@@ -462,6 +427,7 @@
516
517 if (id_gps != 0 && ui.get_center_onpos()) { // Unfocus center if GPS ON
518 ui.set_center_onpos(false);
519+<<<<<<< TREE
520 ui.map_rotation();
521 if (ui.get_center_1st_pos())
522 qml_set_center_onpos(2);
523@@ -471,17 +437,26 @@
524 if (nav.get_route_status() == '2review' && id_auto_accept > 0) {
525 clearTimeout(id_auto_accept);
526 id_auto_accept = -1;
527+=======
528+ if (ui.get_center_1st_pos())
529+ qml_set_center_onpos(2);
530+ else
531+ qml_set_center_onpos(1);
532+>>>>>>> MERGE-SOURCE
533 }
534 });
535
536 // Zoom
537 function custom_zoom(value) {
538 ui.set_zoom_unav(false);
539+<<<<<<< TREE
540
541 if (nav.get_route_status() == '2review' && id_auto_accept > 0) {
542 clearTimeout(id_auto_accept);
543 id_auto_accept = -1;
544 }
545+=======
546+>>>>>>> MERGE-SOURCE
547
548 var zoom = ol.animation.zoom({duration: 300, resolution: map.getView().getResolution()});
549 map.beforeRender(zoom);
550@@ -554,12 +529,6 @@
551
552 function simulate2coord(lat1, lng1, lat2, lng2) {
553 nav.set_route_status('simulate_calculating');
554-
555- if (id_auto_accept > 0) {
556- clearTimeout(id_auto_accept);
557- id_auto_accept = 0;
558- }
559-
560 webapi.simulate(lat1, lng1, lat2, lng2);
561 ui.update();
562 ui.markers_radar_clear();
563@@ -567,11 +536,6 @@
564 }
565
566 function click_cancel_route() {
567- if (id_auto_accept > 0) {
568- clearTimeout(id_auto_accept);
569- id_auto_accept = 0;
570- }
571-
572 nav.cancel_route();
573
574 ui.update();
575@@ -582,14 +546,7 @@
576 }
577
578 function agree_review() {
579- if (id_auto_accept > 0) {
580- clearTimeout(id_auto_accept);
581- id_auto_accept = 0;
582- }
583- if (id_auto_accept > -2) { // Disabled auto accept
584- id_auto_accept = 0;
585- center_pos();
586- }
587+ center_pos();
588 nav.set_route_status('yes');
589 ui.update();
590 qml_set_center_onpos(2);
591@@ -599,36 +556,36 @@
592
593
594 <!-- Notifications -->
595- <audio id="voice_notif" type="audio/ogg" src="sounds/notification.ogg" />
596- <audio id="radar_sound_alert" type="audio/ogg" src="sounds/radar.ogg" />
597+ <audio id="voice_notif" type="audio/ogg" src="sounds/notification.ogg" preload="none"/>
598+ <audio id="radar_sound_alert" type="audio/ogg" src="sounds/radar.ogg" preload="none"/>
599
600- <audio id="4" type="audio/ogg" src="voices/en/4.ogg"/>
601- <audio id="7" type="audio/ogg" src="voices/en/7.ogg"/>
602- <audio id="8" type="audio/ogg" src="voices/en/8.ogg"/>
603- <audio id="9" type="audio/ogg" src="voices/en/9.ogg"/>
604- <audio id="10" type="audio/ogg" src="voices/en/10.ogg"/>
605- <audio id="11" type="audio/ogg" src="voices/en/11.ogg"/>
606- <audio id="12" type="audio/ogg" src="voices/en/12.ogg"/>
607- <audio id="13" type="audio/ogg" src="voices/en/13.ogg"/>
608- <audio id="14" type="audio/ogg" src="voices/en/14.ogg"/>
609- <audio id="15" type="audio/ogg" src="voices/en/15.ogg"/>
610- <audio id="16" type="audio/ogg" src="voices/en/16.ogg"/>
611- <audio id="17" type="audio/ogg" src="voices/en/17.ogg"/>
612- <audio id="18" type="audio/ogg" src="voices/en/18.ogg"/>
613- <audio id="19" type="audio/ogg" src="voices/en/19.ogg"/>
614- <audio id="20" type="audio/ogg" src="voices/en/20.ogg"/>
615- <audio id="21" type="audio/ogg" src="voices/en/21.ogg"/>
616- <audio id="22" type="audio/ogg" src="voices/en/22.ogg"/>
617- <audio id="23" type="audio/ogg" src="voices/en/23.ogg"/>
618- <audio id="24" type="audio/ogg" src="voices/en/24.ogg"/>
619- <audio id="25" type="audio/ogg" src="voices/en/25.ogg"/>
620- <audio id="26" type="audio/ogg" src="voices/en/26.ogg"/>
621- <audio id="261" type="audio/ogg" src="voices/en/261.ogg"/>
622- <audio id="262" type="audio/ogg" src="voices/en/262.ogg"/>
623- <audio id="263" type="audio/ogg" src="voices/en/263.ogg"/>
624- <audio id="264" type="audio/ogg" src="voices/en/264.ogg"/>
625- <audio id="28" type="audio/ogg" src="voices/en/28.ogg"/>
626- <audio id="29" type="audio/ogg" src="voices/en/29.ogg"/>
627+ <audio id="4" type="audio/ogg" src="voices/en/4.ogg" preload="none"/>
628+ <audio id="7" type="audio/ogg" src="voices/en/7.ogg" preload="none"/>
629+ <audio id="8" type="audio/ogg" src="voices/en/8.ogg" preload="none"/>
630+ <audio id="9" type="audio/ogg" src="voices/en/9.ogg" preload="none"/>
631+ <audio id="10" type="audio/ogg" src="voices/en/10.ogg" preload="none"/>
632+ <audio id="11" type="audio/ogg" src="voices/en/11.ogg" preload="none"/>
633+ <audio id="12" type="audio/ogg" src="voices/en/12.ogg" preload="none"/>
634+ <audio id="13" type="audio/ogg" src="voices/en/13.ogg" preload="none"/>
635+ <audio id="14" type="audio/ogg" src="voices/en/14.ogg" preload="none"/>
636+ <audio id="15" type="audio/ogg" src="voices/en/15.ogg" preload="none"/>
637+ <audio id="16" type="audio/ogg" src="voices/en/16.ogg" preload="none"/>
638+ <audio id="17" type="audio/ogg" src="voices/en/17.ogg" preload="none"/>
639+ <audio id="18" type="audio/ogg" src="voices/en/18.ogg" preload="none"/>
640+ <audio id="19" type="audio/ogg" src="voices/en/19.ogg" preload="none"/>
641+ <audio id="20" type="audio/ogg" src="voices/en/20.ogg" preload="none"/>
642+ <audio id="21" type="audio/ogg" src="voices/en/21.ogg" preload="none"/>
643+ <audio id="22" type="audio/ogg" src="voices/en/22.ogg" preload="none"/>
644+ <audio id="23" type="audio/ogg" src="voices/en/23.ogg" preload="none"/>
645+ <audio id="24" type="audio/ogg" src="voices/en/24.ogg" preload="none"/>
646+ <audio id="25" type="audio/ogg" src="voices/en/25.ogg" preload="none"/>
647+ <audio id="26" type="audio/ogg" src="voices/en/26.ogg" preload="none"/>
648+ <audio id="261" type="audio/ogg" src="voices/en/261.ogg" preload="none"/>
649+ <audio id="262" type="audio/ogg" src="voices/en/262.ogg" preload="none"/>
650+ <audio id="263" type="audio/ogg" src="voices/en/263.ogg" preload="none"/>
651+ <audio id="264" type="audio/ogg" src="voices/en/264.ogg" preload="none"/>
652+ <audio id="28" type="audio/ogg" src="voices/en/28.ogg" preload="none"/>
653+ <audio id="29" type="audio/ogg" src="voices/en/29.ogg" preload="none"/>
654
655 <script>
656 // Localize voices
657
658=== modified file 'nav/locales/unav.pot'
659--- nav/locales/unav.pot 2016-05-09 17:56:34 +0000
660+++ nav/locales/unav.pot 2016-06-13 21:48:55 +0000
661@@ -8,7 +8,11 @@
662 msgstr ""
663 "Project-Id-Version: PACKAGE VERSION\n"
664 "Report-Msgid-Bugs-To: \n"
665+<<<<<<< TREE
666 "POT-Creation-Date: 2016-05-09 19:56+0200\n"
667+=======
668+"POT-Creation-Date: 2016-06-06 19:37+0200\n"
669+>>>>>>> MERGE-SOURCE
670 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
671 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
672 "Language-Team: LANGUAGE <LL@li.org>\n"
673@@ -154,11 +158,19 @@
674 msgid "Insert a favorite name"
675 msgstr ""
676
677+<<<<<<< TREE
678 #: qml/Favorites.qml:211 qml/Main.qml:695 nav/class/UI.js:48
679+=======
680+#: qml/Favorites.qml:211 qml/Main.qml:740 nav/class/UI.js:40
681+>>>>>>> MERGE-SOURCE
682 msgid "Current Position"
683 msgstr ""
684
685+<<<<<<< TREE
686 #: qml/Favorites.qml:226 qml/SettingsPage.qml:359
687+=======
688+#: qml/Favorites.qml:226 qml/SettingsPage.qml:367
689+>>>>>>> MERGE-SOURCE
690 msgid "Cancel"
691 msgstr ""
692
693@@ -174,81 +186,161 @@
694 msgid "Update"
695 msgstr ""
696
697+<<<<<<< TREE
698 #: qml/Location.qml:39 qml/PoiListPage.qml:142
699+=======
700+#: qml/Location.qml:40 qml/PoiListPage.qml:142
701+>>>>>>> MERGE-SOURCE
702 msgid "Time out! Please try again"
703 msgstr ""
704
705+<<<<<<< TREE
706 #. TRANSLATORS: This string is search shown when no POIs are found with the chosen search radius. %1 is the POI type eg..Pub, Airport
707 #. Example string, "Sorry, no Airport found nearby. Try again with a larger search radius"
708 #: qml/Location.qml:47 qml/PoiListPage.qml:150
709 #, qt-format
710 msgid "Sorry, no %1 found nearby. Try again with a larger search radius"
711+=======
712+#. TRANSLATORS: This string is search shown when no POIs are found with the chosen search radius.
713+#: qml/Location.qml:48
714+msgid "Sorry, nothing found. Try another search"
715+>>>>>>> MERGE-SOURCE
716 msgstr ""
717
718+<<<<<<< TREE
719 #: qml/Location.qml:130 qml/Location.qml:318 qml/Location.qml:380
720+=======
721+#: qml/Location.qml:131 qml/Location.qml:319 qml/Location.qml:381
722+>>>>>>> MERGE-SOURCE
723 msgid "Search history"
724 msgstr ""
725
726+<<<<<<< TREE
727 #: qml/Location.qml:140 qml/Location.qml:324 qml/Location.qml:382
728+=======
729+#: qml/Location.qml:141 qml/Location.qml:325 qml/Location.qml:383
730+>>>>>>> MERGE-SOURCE
731 msgid "Favorite history"
732 msgstr ""
733
734+<<<<<<< TREE
735 #: qml/Location.qml:150 qml/Location.qml:321 qml/Location.qml:337
736 #: qml/Location.qml:348 qml/Location.qml:363 qml/Location.qml:370
737 #: qml/Location.qml:401 qml/Location.qml:407
738+=======
739+#: qml/Location.qml:151 qml/Location.qml:322 qml/Location.qml:338
740+#: qml/Location.qml:349 qml/Location.qml:364 qml/Location.qml:371
741+#: qml/Location.qml:402 qml/Location.qml:408
742+>>>>>>> MERGE-SOURCE
743 msgid "Nearby history"
744 msgstr ""
745
746-#: qml/Location.qml:167
747+#: qml/Location.qml:168
748 msgid "No history yet…"
749 msgstr ""
750
751-#: qml/Location.qml:167
752+#: qml/Location.qml:168
753 msgid "History is disabled"
754 msgstr ""
755
756-#: qml/Location.qml:214
757+#: qml/Location.qml:215
758 msgid "Search location"
759 msgstr ""
760
761+<<<<<<< TREE
762 #: qml/Location.qml:219 qml/PoiListPage.qml:160
763+=======
764+#: qml/Location.qml:220 qml/PoiListPage.qml:160
765+>>>>>>> MERGE-SOURCE
766 msgid "Searching…"
767 msgstr ""
768
769+<<<<<<< TREE
770 #: qml/Main.qml:193 qml/SettingsPage.qml:35
771+=======
772+#: qml/Main.qml:190 qml/SettingsPage.qml:35
773+>>>>>>> MERGE-SOURCE
774 msgid "Settings"
775 msgstr ""
776
777+<<<<<<< TREE
778 #: qml/Main.qml:205
779+=======
780+#: qml/Main.qml:202
781+>>>>>>> MERGE-SOURCE
782 msgid "Center on Position"
783 msgstr ""
784
785+<<<<<<< TREE
786 #: qml/Main.qml:218 qml/PoiPage.qml:83 qml/SearchPage.qml:69
787+=======
788+#: qml/Main.qml:206 qml/Main.qml:502
789+msgid "Searching your position… This could take a while"
790+msgstr ""
791+
792+#: qml/Main.qml:220 qml/PoiPage.qml:83 qml/SearchPage.qml:69
793+>>>>>>> MERGE-SOURCE
794 msgid "Search"
795 msgstr ""
796
797+<<<<<<< TREE
798 #: qml/Main.qml:230
799+=======
800+#: qml/Main.qml:232
801+>>>>>>> MERGE-SOURCE
802 msgid "Destination"
803 msgstr ""
804
805+<<<<<<< TREE
806 #: qml/Main.qml:410 qml/Main.qml:436
807+=======
808+#: qml/Main.qml:377
809+msgid "Error getting speed cameras!"
810+msgstr ""
811+
812+#: qml/Main.qml:429 qml/Main.qml:455
813+>>>>>>> MERGE-SOURCE
814 msgid "Shared Position"
815 msgstr ""
816
817+<<<<<<< TREE
818 #: qml/Main.qml:639
819+=======
820+#: qml/Main.qml:684
821+>>>>>>> MERGE-SOURCE
822 msgid "NearBy Destination"
823 msgstr ""
824
825+<<<<<<< TREE
826 #: qml/Main.qml:640
827+=======
828+#: qml/Main.qml:685
829+>>>>>>> MERGE-SOURCE
830 msgid "Cancel Route"
831 msgstr ""
832
833+<<<<<<< TREE
834 #: qml/Main.qml:684
835+=======
836+#: qml/Main.qml:729
837+>>>>>>> MERGE-SOURCE
838 #, qt-format
839 msgid "Coord: %1, %2"
840 msgstr ""
841
842-#: qml/PoiDetailsPage.qml:77
843+<<<<<<< TREE
844+#: qml/PoiDetailsPage.qml:77
845+=======
846+#: qml/Main.qml:796
847+msgid "Simulate from here! Now click on destination"
848+msgstr ""
849+
850+#: qml/Main.qml:813
851+msgid "Set a different coordinates for simulating"
852+msgstr ""
853+
854+#: qml/PoiDetailsPage.qml:77
855+>>>>>>> MERGE-SOURCE
856 msgid "Lat, Long:"
857 msgstr ""
858
859@@ -292,6 +384,13 @@
860 msgid "Something was wrong. Please, try again…"
861 msgstr ""
862
863+#. TRANSLATORS: This string is search shown when no POIs are found with the chosen search radius. %1 is the POI type eg..Pub, Airport
864+#. Example string, "Sorry, no Airport found nearby. Try again with a larger search radius"
865+#: qml/PoiListPage.qml:150
866+#, qt-format
867+msgid "Sorry, no %1 found nearby. Try again with a larger search radius"
868+msgstr ""
869+
870 #. TRANSLATORS: Abbreviation for Public Holiday. This string is used while showing the opening hours
871 #. of a place which might be closed during public holidays.
872 #: qml/PoiListPage.qml:316
873@@ -319,6 +418,24 @@
874 msgid "Most recent"
875 msgstr ""
876
877+#: qml/PoiQuickAccessPage.qml:63
878+msgid "Quick Access: "
879+msgstr ""
880+
881+#: qml/PoiQuickAccessPage.qml:201
882+msgid "Selection"
883+msgstr ""
884+
885+#. TRANSLATORS: argument is a number > 1.
886+#: qml/PoiQuickAccessPage.qml:203
887+#, qt-format
888+msgid "Max. %1 POIs can be selected."
889+msgstr ""
890+
891+#: qml/PoiQuickAccessPage.qml:206 qml/SettingsPage.qml:388
892+msgid "OK"
893+msgstr ""
894+
895 #: qml/RouteInfoListPage.qml:29
896 msgid "Route Info"
897 msgstr ""
898@@ -413,6 +530,7 @@
899 msgid "Map"
900 msgstr ""
901
902+<<<<<<< TREE
903 #: qml/SettingsPage.qml:232
904 msgid "Mode"
905 msgstr ""
906@@ -422,38 +540,81 @@
907 msgstr ""
908
909 #: qml/SettingsPage.qml:271
910+=======
911+#: qml/SettingsPage.qml:232
912+msgid "Mode"
913+msgstr ""
914+
915+#: qml/SettingsPage.qml:262
916+msgid "How to use offline maps"
917+msgstr ""
918+
919+#: qml/SettingsPage.qml:279
920+>>>>>>> MERGE-SOURCE
921 msgid "Units"
922 msgstr ""
923
924+<<<<<<< TREE
925 #: qml/SettingsPage.qml:305
926+=======
927+#: qml/SettingsPage.qml:313
928+>>>>>>> MERGE-SOURCE
929 msgid "Show header in map view"
930 msgstr ""
931
932+<<<<<<< TREE
933 #: qml/SettingsPage.qml:317
934+=======
935+#: qml/SettingsPage.qml:325
936+>>>>>>> MERGE-SOURCE
937 msgid "History"
938 msgstr ""
939
940+<<<<<<< TREE
941 #: qml/SettingsPage.qml:324
942+=======
943+#: qml/SettingsPage.qml:332
944+>>>>>>> MERGE-SOURCE
945 msgid "Store new searches"
946 msgstr ""
947
948+<<<<<<< TREE
949 #: qml/SettingsPage.qml:336 qml/SettingsPage.qml:346
950+=======
951+#: qml/SettingsPage.qml:344 qml/SettingsPage.qml:354
952+>>>>>>> MERGE-SOURCE
953 msgid "Clear History"
954 msgstr ""
955
956+<<<<<<< TREE
957 #: qml/SettingsPage.qml:347
958+=======
959+#: qml/SettingsPage.qml:355
960+>>>>>>> MERGE-SOURCE
961 msgid "You'll delete the current history"
962 msgstr ""
963
964+<<<<<<< TREE
965 #: qml/SettingsPage.qml:350
966+=======
967+#: qml/SettingsPage.qml:358
968+>>>>>>> MERGE-SOURCE
969 msgid "Delete"
970 msgstr ""
971
972+<<<<<<< TREE
973 #: qml/SettingsPage.qml:369
974+=======
975+#: qml/SettingsPage.qml:377
976+>>>>>>> MERGE-SOURCE
977 msgid "Speed Camera alerts and the law"
978 msgstr ""
979
980+<<<<<<< TREE
981 #: qml/SettingsPage.qml:370
982+=======
983+#: qml/SettingsPage.qml:378
984+>>>>>>> MERGE-SOURCE
985 msgid ""
986 "uNav is only reading the OpenStreetMap database.\n"
987 "uNav will show a max speed notification and a Speed Camera marker (marker "
988@@ -463,6 +624,7 @@
989 "only if it's legal in the country."
990 msgstr ""
991
992+<<<<<<< TREE
993 #: qml/SettingsPage.qml:376
994 msgid "Read more about it"
995 msgstr ""
996@@ -472,6 +634,13 @@
997 msgstr ""
998
999 #: qml/Share.qml:33
1000+=======
1001+#: qml/SettingsPage.qml:384
1002+msgid "Read more about it"
1003+msgstr ""
1004+
1005+#: qml/Share.qml:33
1006+>>>>>>> MERGE-SOURCE
1007 msgid "Share location to"
1008 msgstr ""
1009
1010@@ -487,9 +656,6 @@
1011 msgid "Start"
1012 msgstr ""
1013
1014-msgid "Error getting speed cameras"
1015-msgstr ""
1016-
1017 msgid "Route so long"
1018 msgstr ""
1019
1020@@ -508,23 +674,6 @@
1021 msgid "Please review your device settings"
1022 msgstr ""
1023
1024-msgid "GPS device is not working"
1025-msgstr ""
1026-
1027-msgid "The GPS device didn't return a position yet"
1028-msgstr ""
1029-
1030-msgid ""
1031-"Review the GPS device settings (check at bottom of battery settings too)"
1032-msgstr ""
1033-
1034-msgid ""
1035-"If everything is OK, try a device reboot :( The GPS device will work again"
1036-msgstr ""
1037-
1038-msgid "It doesn't work either, please fill a bug: bugs.launchpad.net/unav"
1039-msgstr ""
1040-
1041 #: qml/js/PoiCategories.js:4
1042 msgid "Transport"
1043 msgstr ""
1044@@ -1009,7 +1158,11 @@
1045 msgid "Go to your left"
1046 msgstr ""
1047
1048+<<<<<<< TREE
1049 #: nav/class/Navigator.js:288 nav/class/UI.js:451
1050+=======
1051+#: nav/class/Navigator.js:288 nav/class/UI.js:436
1052+>>>>>>> MERGE-SOURCE
1053 msgid "You have arrived at your destination"
1054 msgstr ""
1055
1056@@ -1149,47 +1302,91 @@
1057 msgid ", %1"
1058 msgstr ""
1059
1060+<<<<<<< TREE
1061 #: nav/class/UI.js:57
1062+=======
1063+#: nav/class/UI.js:49
1064+>>>>>>> MERGE-SOURCE
1065 msgid "Current Start"
1066 msgstr ""
1067
1068+<<<<<<< TREE
1069 #: nav/class/UI.js:66
1070+=======
1071+#: nav/class/UI.js:58
1072+>>>>>>> MERGE-SOURCE
1073 msgid "Current End"
1074 msgstr ""
1075
1076+<<<<<<< TREE
1077 #: nav/class/UI.js:389
1078+=======
1079+#: nav/class/UI.js:374
1080+>>>>>>> MERGE-SOURCE
1081 msgid "Waiting for a GPS signal…"
1082 msgstr ""
1083
1084+<<<<<<< TREE
1085 #: nav/class/UI.js:394
1086+=======
1087+#: nav/class/UI.js:379
1088+>>>>>>> MERGE-SOURCE
1089 msgid "Searching for a route…"
1090 msgstr ""
1091
1092+<<<<<<< TREE
1093 #: nav/class/UI.js:398
1094+=======
1095+#: nav/class/UI.js:383
1096+>>>>>>> MERGE-SOURCE
1097 msgid "Drawing route…"
1098 msgstr ""
1099
1100+<<<<<<< TREE
1101 #: nav/class/UI.js:402
1102+=======
1103+#: nav/class/UI.js:387
1104+>>>>>>> MERGE-SOURCE
1105 msgid "Error finding route between points. Check the connection and try again"
1106 msgstr ""
1107
1108+<<<<<<< TREE
1109 #: nav/class/UI.js:406
1110+=======
1111+#: nav/class/UI.js:391
1112+>>>>>>> MERGE-SOURCE
1113 msgid "Recalculating route…"
1114 msgstr ""
1115
1116+<<<<<<< TREE
1117 #: nav/class/UI.js:427
1118+=======
1119+#: nav/class/UI.js:412
1120+>>>>>>> MERGE-SOURCE
1121 msgid "Navigation will start soon"
1122 msgstr ""
1123
1124+<<<<<<< TREE
1125 #: nav/class/UI.js:458
1126+=======
1127+#: nav/class/UI.js:443
1128+>>>>>>> MERGE-SOURCE
1129 msgid "Simulating route…"
1130 msgstr ""
1131
1132+<<<<<<< TREE
1133 #: nav/class/UI.js:462
1134+=======
1135+#: nav/class/UI.js:447
1136+>>>>>>> MERGE-SOURCE
1137 msgid "Error simulating route. Try different points"
1138 msgstr ""
1139
1140+<<<<<<< TREE
1141 #: nav/class/UI.js:483
1142+=======
1143+#: nav/class/UI.js:468
1144+>>>>>>> MERGE-SOURCE
1145 msgid "Click onto the icon for reviewing the route"
1146 msgstr ""
1147
1148
1149=== modified file 'qml/AboutPage.qml'
1150--- qml/AboutPage.qml 2016-05-05 19:21:33 +0000
1151+++ qml/AboutPage.qml 2016-06-13 21:48:55 +0000
1152@@ -106,7 +106,7 @@
1153
1154 header: Item {
1155 width: parent.width
1156- height: appColumn.height + donateColumn.height + units.gu(10)
1157+ height: appColumn.height + units.gu(10)
1158 Column {
1159 id: appColumn
1160 spacing: units.gu(1)
1161@@ -134,28 +134,6 @@
1162 onLinkActivated: Qt.openUrlExternally(link)
1163 }
1164 }
1165-
1166- Column {
1167- id: donateColumn
1168- anchors.top: appColumn.bottom
1169- anchors.topMargin: units.gu(3)
1170- width: parent.width
1171- spacing: units.gu(1)
1172- Label {
1173- id: donateLabel
1174- text: i18n.tr("Support its future development")
1175- anchors.horizontalCenter: parent.horizontalCenter
1176- wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
1177- horizontalAlignment: Text.AlignHCenter
1178- width: parent.width - units.gu(12)
1179- }
1180- Button {
1181- anchors.horizontalCenter: parent.horizontalCenter
1182- color: UbuntuColors.green
1183- text: i18n.tr("Buy Donate Version")
1184- onClicked: Qt.openUrlExternally("scope://com.canonical.scopes.clickstore?q=unavdonateversion")
1185- }
1186- }
1187 }
1188
1189 delegate: ListItem {
1190
1191=== modified file 'qml/Main.qml'
1192--- qml/Main.qml 2016-06-08 17:16:09 +0000
1193+++ qml/Main.qml 2016-06-13 21:48:55 +0000
1194@@ -202,6 +202,11 @@
1195 text: i18n.tr("Center on Position")
1196 enabled: navigationPage.buttonsEnabled && mainPageStack.center_onpos !== 2
1197 onTriggered: {
1198+ if (mainPageStack.center_onpos === 0) {
1199+ notifiactionBar.text = i18n.tr("Searching your position… This could take a while");
1200+ notifiactionBar.info();
1201+ notificationBarTimer.start();
1202+ }
1203 mainPageStack.center_onpos = 2;
1204 goThereActionPopover.hide();
1205 mainPageStack.executeJavaScript("center_pos()");
1206@@ -302,6 +307,7 @@
1207 goThereActionPopover.osm_id = 'none';
1208 goThereActionPopover.phone = '';
1209 goThereActionPopover.poiName = "";
1210+ notifiactionBar.visible = false;
1211
1212 if (params[0] === 'nofollow' && mainPageStack.center_onpos === 2)
1213 mainPageStack.center_onpos = 1;
1214@@ -365,6 +371,7 @@
1215 navApp.settings.prevLng = params[1];
1216 navApp.settings.prevZoom = params[2];
1217 break;
1218+<<<<<<< TREE
1219
1220 case "http://show_notification/":
1221 if (params[1] === "speed_camera_error") {
1222@@ -381,7 +388,37 @@
1223 notifiactionBar.critical();
1224 }
1225 notificationBarTimer.start();
1226+=======
1227+
1228+ case "http://show_notification/":
1229+ switch (params[0]) {
1230+ case "info":
1231+ notifiactionBar.info();
1232+ break;
1233+ case "warning":
1234+ notifiactionBar.warning();
1235+ break;
1236+ case "critical":
1237+ notifiactionBar.critical();
1238+ }
1239+ switch (params[1]) {
1240+ case "speed_camera_error":
1241+ notifiactionBar.text = i18n.tr("Error getting speed cameras!");
1242+ break;
1243+ case "webapi_error":
1244+ notifiactionBar.text = i18n.tr("Error finding route! Retrying again in 1 minute…");
1245+ break;
1246+ case "calcfromout_error":
1247+ notifiactionBar.text = i18n.tr("Error finding route! Trying again…");
1248+ break;
1249+ }
1250+ notificationBarTimer.start();
1251+>>>>>>> MERGE-SOURCE
1252 }
1253+<<<<<<< TREE
1254+=======
1255+
1256+>>>>>>> MERGE-SOURCE
1257 request.action = Oxide.NavigationRequest.ActionReject;
1258 }
1259
1260@@ -491,7 +528,11 @@
1261 icon.name: mainPageStack.center_onpos ? "media-optical-symbolic" : "gps"
1262 enabled: navigationPage.buttonsEnabled && mainPageStack.center_onpos !== 2
1263 onClicked: {
1264- mainPageStack.center_onpos = 2;
1265+ if (mainPageStack.center_onpos === 0) {
1266+ notifiactionBar.text = i18n.tr("Searching your position… This could take a while");
1267+ notifiactionBar.info();
1268+ notificationBarTimer.start();
1269+ } mainPageStack.center_onpos = 2;
1270 goThereActionPopover.hide();
1271 mainPageStack.executeJavaScript("center_pos()");
1272 }
1273@@ -522,6 +563,7 @@
1274 }
1275 }
1276
1277+<<<<<<< TREE
1278 Timer {
1279 id: notificationBarTimer
1280 interval: 8000
1281@@ -535,6 +577,21 @@
1282 id: notifiactionBar
1283 }
1284
1285+=======
1286+ Timer {
1287+ id: notificationBarTimer
1288+ interval: 7000
1289+ repeat: false
1290+ onTriggered: {
1291+ notifiactionBar.visible = false
1292+ }
1293+ }
1294+
1295+ NotificationBar {
1296+ id: notifiactionBar
1297+ }
1298+
1299+>>>>>>> MERGE-SOURCE
1300 XmlListModel {
1301 id: reverseXmlModel
1302
1303@@ -782,6 +839,10 @@
1304 goThereActionPopover.hide();
1305 mainPageStack.ptFromLat = mainPageStack.clickedLat;
1306 mainPageStack.ptFromLng = mainPageStack.clickedLng;
1307+ notifiactionBar.text = i18n.tr("Simulate from here! Now click on destination");
1308+ notifiactionBar.info();
1309+ notificationBarTimer.start();
1310+
1311 }
1312 }
1313
1314@@ -791,10 +852,20 @@
1315 icon.height: units.gu(3)
1316 highlightSize: units.gu(-1)
1317 onClicked: {
1318- goThereActionPopover.hide();
1319- mainPageStack.routeState = 'simulate_calculating';
1320- mainPageStack.executeJavaScript("simulate2coord(" + mainPageStack.ptFromLat + ", " + mainPageStack.ptFromLng + ", " + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
1321- mainPageStack.ptFromLat = "null";
1322+ // Validate coordinates are different points
1323+ if (mainPageStack.ptFromLat === mainPageStack.clickedLat && mainPageStack.ptFromLng === mainPageStack.clickedLng) {
1324+ goThereActionPopover.hide();
1325+ mainPageStack.ptFromLat = "null";
1326+ notifiactionBar.text = i18n.tr("Set a different coordinates for simulating");
1327+ notifiactionBar.warning();
1328+ notificationBarTimer.start();
1329+ }
1330+ else {
1331+ goThereActionPopover.hide();
1332+ mainPageStack.routeState = 'simulate_calculating';
1333+ mainPageStack.executeJavaScript("simulate2coord(" + mainPageStack.ptFromLat + ", " + mainPageStack.ptFromLng + ", " + mainPageStack.clickedLat + ", " + mainPageStack.clickedLng + ");");
1334+ mainPageStack.ptFromLat = "null";
1335+ }
1336 }
1337 }
1338 }
1339
1340=== modified file 'qml/components/NotificationBar.qml'
1341--- qml/components/NotificationBar.qml 2016-05-22 17:20:29 +0000
1342+++ qml/components/NotificationBar.qml 2016-06-13 21:48:55 +0000
1343@@ -1,3 +1,4 @@
1344+<<<<<<< TREE
1345 /*
1346 * GPS Navigation http://launchpad.net/unav
1347 * Copyright (C) 2015-2016 JkB https://launchpad.net/~joergberroth
1348@@ -86,3 +87,93 @@
1349 elide: Text.ElideRight
1350 }
1351 }
1352+=======
1353+/*
1354+ * GPS Navigation http://launchpad.net/unav
1355+ * Copyright (C) 2015-2016 JkB https://launchpad.net/~joergberroth
1356+ * Copyright (C) 2015-2016 Marcos Alvarez Costales https://launchpad.net/~costales
1357+ *
1358+ * GPS Navigation is free software; you can redistribute it and/or modify
1359+ * it under the terms of the GNU General Public License as published by
1360+ * the Free Software Foundation; either version 3 of the License, or
1361+ * (at your option) any later version.
1362+ *
1363+ * GPS Navigation is distributed in the hope that it will be useful,
1364+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1365+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1366+ * GNU General Public License for more details.
1367+ */
1368+
1369+import QtQuick 2.4
1370+import Ubuntu.Components 1.3
1371+
1372+Rectangle {
1373+ id: notificationRectangle
1374+
1375+ property alias text: notificationLabel.text
1376+
1377+ signal info()
1378+ signal warning()
1379+ signal critical()
1380+
1381+ onInfo: {
1382+ notificationLabel.color = UbuntuColors.slate
1383+ notificationRectangle.color = "#FFFFFF"
1384+ notificationRectangle.visible = true;
1385+ notificationIcon.name = ""
1386+ notificationLabel.fontSize = "large"
1387+ notificationRectangle.height = notificationLabel.height + units.gu(1)
1388+ }
1389+ onWarning: {
1390+ notificationLabel.color = "#FFFFFF"
1391+ notificationRectangle.color = UbuntuColors.orange;
1392+ notificationRectangle.visible = true;
1393+ notificationLabel.fontSize = "large"
1394+ notificationIcon.name = "dialog-warning-symbolic"
1395+ notificationRectangle.height = notificationLabel.height + units.gu(4)
1396+ }
1397+ onCritical: {
1398+ notificationLabel.color = "#FFFFFF"
1399+ notificationRectangle.color = UbuntuColors.red
1400+ notificationRectangle.visible = true;
1401+ notificationLabel.fontSize = "large"
1402+ notificationIcon.name = "dialog-error-symbolic"
1403+ notificationRectangle.height = notificationLabel.height + units.gu(4)
1404+ }
1405+
1406+ width: parent.width
1407+ visible: false
1408+
1409+ anchors {
1410+ top: goThereActionPopover.isShown ? goThereActionPopover.bottom : navigationPage.header.bottom
1411+ }
1412+
1413+ Icon {
1414+ id: notificationIcon
1415+ width: units.gu(3.5)
1416+ height: width
1417+ anchors {
1418+ verticalCenter: parent.verticalCenter
1419+ left: parent.left
1420+ leftMargin: units.gu(2)
1421+ }
1422+ visible: name !== ""
1423+ color: "#FFFFFF"
1424+
1425+ }
1426+
1427+ Label {
1428+ id: notificationLabel
1429+ anchors {
1430+ left: notificationIcon.visible ? notificationIcon.right : parent.left
1431+ margins: units.gu(1)
1432+ right: parent.right
1433+ verticalCenter: parent.verticalCenter
1434+ }
1435+ horizontalAlignment: Text.AlignHCenter
1436+ maximumLineCount: 3
1437+ wrapMode: Text.WordWrap
1438+ elide: Text.ElideRight
1439+ }
1440+}
1441+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches