Commit dd543c0
Łukasz Paczos
refactor
- refactors `MapboxDirections` to accept `RouteOptions` as an argument that defines request parameters
- moves `requestUuid` object out of `RouteOptions` and into `DirectionsRoute` since the UUID is not a request parameter, it's a response value
- adds `enableRefresh` to `RouteOptions` since it is a route request parameter
- removes a separate `WalkingOptions` in favor of storing the parameter directly in the `RouteOptions`
- exposes `arriveBy` and `departAt` arguemnts, superseding #1187
- exposes `ANNOTATION_CONGESTION_NUMERIC` parameter
- updates documentation for various route request parameters
- exposes `DirectionsResponse#fromJson(json, route options, request uuid)` that allows developers to provide information about the original route request which response they are deserialzing so that Nav SDK can operate correctly
- exposes `DirectionsRoute#fromJson(json, route options, request uuid)` for same reason as above
- exposes `RouteOptions#fromUrl` utility function that creates the object from the request URL which might be useful when paired with the above functions
- adds default values for `RouteOptions`: base URL, user, and geometry encoding (polyline6)
- all comma or semicolon separated lists had a `List` overload in `RouteOptions` besides `coordinates, now this is aligned and there is `RouteOptions#coordinates(string)` and `RouteOptions#coordinatesList(list)`
- fixes an issue where coordinates were rounded to 6 decimal places instead of 7 decimal places that the GeoJSON specification expectsRouteOptions and make the a MapboxDirections parameter, fix smaller issues1 parent 59e274d commit dd543c0
33 files changed
Lines changed: 2861 additions & 3742 deletions
File tree
- config/checkstyle
- samples/src/main/java/com/mapbox/samples
- services-core/src/main/java/com/mapbox/core
- services-directions-models/src
- main/java/com/mapbox/api/directions/v5
- models
- utils
- test
- java/com/mapbox/api/directions/v5
- models
- utils
- resources
- services-directions/src
- main/java/com/mapbox/api/directions/v5
- test
- java/com/mapbox/api/directions/v5
- resources
- services-matching/src
- main/java/com/mapbox/api/matching/v5
- models
- test/java/com/mapbox/api/matching/v5
- models
- services-matrix/src/main/java/com/mapbox/api/matrix/v1
- services-optimization/src/main/java/com/mapbox/api/optimization/v1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | 441 | | |
449 | 442 | | |
450 | 443 | | |
| |||
Lines changed: 41 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
56 | | - | |
57 | 63 | | |
58 | 64 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
| 116 | + | |
104 | 117 | | |
105 | 118 | | |
106 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
107 | 123 | | |
108 | | - | |
109 | | - | |
| 124 | + | |
110 | 125 | | |
111 | 126 | | |
112 | 127 | | |
| 128 | + | |
113 | 129 | | |
114 | 130 | | |
115 | | - | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
| |||
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
| 53 | + | |
42 | 54 | | |
43 | | - | |
44 | | - | |
45 | 55 | | |
46 | 56 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | | - | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
Lines changed: 34 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
91 | | - | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
98 | | - | |
| 103 | + | |
99 | 104 | | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | | - | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
126 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
| |||
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
216 | | - | |
| 232 | + | |
217 | 233 | | |
218 | 234 | | |
219 | 235 | | |
| |||
222 | 238 | | |
223 | 239 | | |
224 | 240 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 241 | + | |
| 242 | + | |
229 | 243 | | |
230 | 244 | | |
231 | 245 | | |
| |||
284 | 298 | | |
285 | 299 | | |
286 | 300 | | |
287 | | - | |
288 | | - | |
289 | 301 | | |
| 302 | + | |
290 | 303 | | |
291 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
292 | 308 | | |
293 | 309 | | |
294 | 310 | | |
| |||
0 commit comments