1use crate::waze_route_calculator::WazeRouteCalculator;
2use crate::waze_structs::WazeAddressCoordinates;
3
4#[derive(Copy, Clone, Debug)]
6pub enum Region {
7 US = 0,
9
10 EU,
12
13 IL,
15
16 AU,
18}
19
20#[derive(Copy, Clone, Debug, PartialEq)]
22pub enum VehicleType {
23 CAR,
25
26 TAXI,
28
29 MOTORCYCLE,
31}
32
33impl VehicleType {
34 pub fn to_string(&self) -> &str {
39 match self {
40 VehicleType::CAR => "",
41 VehicleType::TAXI => "TAXI",
42 VehicleType::MOTORCYCLE => "MOTORCYCLE",
43 }
44 }
45}
46impl WazeRouteCalculator {
47 pub const WAZE_URL: &'static str = "https://www.waze.com/";
49
50 pub(crate) const BASE_COORDS: [(Region, WazeAddressCoordinates); 4] = [
52 (
53 Region::US,
54 WazeAddressCoordinates {
55 lat: 40.713,
56 lon: -74.006,
57 },
58 ),
59 (
60 Region::EU,
61 WazeAddressCoordinates {
62 lat: 47.498,
63 lon: 19.040,
64 },
65 ),
66 (
67 Region::IL,
68 WazeAddressCoordinates {
69 lat: 31.768,
70 lon: 35.214,
71 },
72 ),
73 (
74 Region::AU,
75 WazeAddressCoordinates {
76 lat: -35.281,
77 lon: 149.128,
78 },
79 ),
80 ];
81
82 pub(crate) const COORD_SERVERS: [(Region, &'static str); 4] = [
84 (Region::US, "SearchServer/mozi"),
85 (Region::EU, "row-SearchServer/mozi"),
86 (Region::IL, "il-SearchServer/mozi"),
87 (Region::AU, "row-SearchServer/mozi"),
88 ];
89
90 pub(crate) const ROUTING_SERVERS: [(Region, &'static str); 4] = [
92 (Region::US, "RoutingManager/routingRequest"),
93 (Region::EU, "row-RoutingManager/routingRequest"),
94 (Region::IL, "il-RoutingManager/routingRequest"),
95 (Region::AU, "row-RoutingManager/routingRequest"),
96 ];
97}