@@ -198,6 +198,31 @@ public List<Bearing> bearingsList() {
198198 return ParseUtils .parseBearings (bearings ());
199199 }
200200
201+ /**
202+ * Influences layer of road from where route starts from a waypoint. Useful in ambiguous
203+ * cases when there are multiple roads at the same point and only layer allows
204+ * to differentiate them.
205+ * <p>
206+ * If provided, the list of layers must be the same length as the list of coordinates.
207+ * @return a string representing the layers with the ; separator. Each value may be negative
208+ or absent.
209+ */
210+ @ Nullable
211+ public abstract String layers ();
212+
213+ /**
214+ * Influences layer of road from where route starts from a waypoint. Useful in ambiguous
215+ * cases when there are multiple roads at the same point and only layer allows
216+ * to differentiate them.
217+ * <p>
218+ * If provided, the list of layers must be the same length as the list of coordinates.
219+ * @return a List of values representing layers. Each value may be negative or null.
220+ */
221+ @ Nullable
222+ public List <Integer > layersList () {
223+ return ParseUtils .parseToIntegers (layers ());
224+ }
225+
201226 /**
202227 * The allowed direction of travel when departing intermediate waypoints. If true, the route
203228 * will continue in the same direction of travel. If false, the route may continue in the opposite
@@ -958,6 +983,36 @@ public Builder bearingsList(@Nullable List<Bearing> bearings) {
958983 return this ;
959984 }
960985
986+ /**
987+ * Influences layer of road from where route starts from a waypoint. Useful in ambiguous
988+ * cases when there are multiple roads at the same point and only layer allows
989+ * to differentiate them.
990+ * <p>
991+ * If provided, the list of layers must be the same length as the list of coordinates.
992+ * @param layers a string representing the layers with the ; separator.
993+ * @return this builder for chaining options together
994+ */
995+ @ NonNull
996+ public abstract Builder layers (@ Nullable String layers );
997+
998+ /**
999+ * Influences layer of road from where route starts from a waypoint. Useful in ambiguous
1000+ * cases when there are multiple roads at the same point and only layer allows
1001+ * to differentiate them.
1002+ * <p>
1003+ * If provided, the list of layers must be the same length as the list of coordinates.
1004+ * @param layers a list of layers. For unknown layer use `null`.
1005+ * @return this builder for chaining options together
1006+ */
1007+ @ NonNull
1008+ public Builder layersList (@ Nullable List <Integer > layers ) {
1009+ String result = FormatUtils .formatIntegers (layers );
1010+ if (result != null ) {
1011+ layers (result );
1012+ }
1013+ return this ;
1014+ }
1015+
9611016 /**
9621017 * The allowed direction of travel when departing intermediate waypoints. If true, the route
9631018 * will continue in the same direction of travel. If false, the route may continue in
0 commit comments