~unav-devs/unav/trunk

« back to all changes in this revision

Viewing changes to nav/class/Settings.js

  • Committer: costales
  • Date: 2017-05-29 16:20:52 UTC
  • Revision ID: costales.marcos@gmail.com-20170529162052-njl7z147gxu2vc7j
Reverted migration to OSRM

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
function Settings() {
17
17
        this.sound = true;
18
18
        this.unit = this.KM;
 
19
        this.routing_mode = 0; // 0 car, 1 walk, 2 bike, 3 multimodal
 
20
        this.avoid_tolls = false;
19
21
        this.alert_radars = true;
20
22
        this.ui_speed = true;
21
23
}
28
30
        this.sound = value;
29
31
}
30
32
 
 
33
Settings.prototype.set_avoid_tolls = function(value) {
 
34
        this.avoid_tolls = value;
 
35
}
 
36
 
31
37
Settings.prototype.set_alert_radars = function(value) {
32
38
        this.alert_radars = value;
33
39
}
39
45
                this.unit = this.MI;
40
46
}
41
47
 
 
48
Settings.prototype.set_routing_mode = function(value) {
 
49
        this.routing_mode = value;
 
50
}
 
51
 
42
52
Settings.prototype.get_sound = function() {
43
53
        return this.sound;
44
54
}
45
55
 
 
56
Settings.prototype.get_avoid_tolls = function() {
 
57
        return this.avoid_tolls;
 
58
}
 
59
 
46
60
Settings.prototype.get_alert_radars = function() {
47
61
        return this.alert_radars;
48
62
}
51
65
        return this.unit;
52
66
}
53
67
 
 
68
Settings.prototype.get_routing_mode = function() {
 
69
        return this.routing_mode;
 
70
}
 
71
 
54
72
Settings.prototype.set_ui_speed = function(value) {
55
73
        this.ui_speed = value;
56
74
}