@iwpnd/valhalla-ts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/decode-polyline.d.ts +22 -0
- package/dist/decode-polyline.d.ts.map +1 -0
- package/dist/decode-polyline.js +68 -0
- package/dist/decode-polyline.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/types/base.d.ts +15 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +3 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/costing.d.ts +232 -0
- package/dist/types/costing.d.ts.map +1 -0
- package/dist/types/costing.js +3 -0
- package/dist/types/costing.js.map +1 -0
- package/dist/types/error.d.ts +7 -0
- package/dist/types/error.d.ts.map +1 -0
- package/dist/types/error.js +3 -0
- package/dist/types/error.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +26 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/languages.d.ts +3 -0
- package/dist/types/languages.d.ts.map +1 -0
- package/dist/types/languages.js +3 -0
- package/dist/types/languages.js.map +1 -0
- package/dist/types/locations.d.ts +56 -0
- package/dist/types/locations.d.ts.map +1 -0
- package/dist/types/locations.js +3 -0
- package/dist/types/locations.js.map +1 -0
- package/dist/types/maneuver.d.ts +110 -0
- package/dist/types/maneuver.d.ts.map +1 -0
- package/dist/types/maneuver.js +46 -0
- package/dist/types/maneuver.js.map +1 -0
- package/dist/types/request.d.ts +120 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/request.js +3 -0
- package/dist/types/request.js.map +1 -0
- package/dist/types/response.d.ts +92 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/response.js +3 -0
- package/dist/types/response.js.map +1 -0
- package/dist/types/tracing.d.ts +15 -0
- package/dist/types/tracing.d.ts.map +1 -0
- package/dist/types/tracing.js +3 -0
- package/dist/types/tracing.js.map +1 -0
- package/dist/valhalla.d.ts +76 -0
- package/dist/valhalla.d.ts.map +1 -0
- package/dist/valhalla.js +117 -0
- package/dist/valhalla.js.map +1 -0
- package/package.json +86 -0
- package/readme.md +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Ben
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as GeoJSON from 'geojson';
|
|
2
|
+
/**
|
|
3
|
+
* Decode a valhalla polyline to an array of {@link GeoJSON.Position}
|
|
4
|
+
*
|
|
5
|
+
* @param {String} polyline
|
|
6
|
+
* @param {Number} precision = 6
|
|
7
|
+
* @returns {@link GeoJSON.Position[]}
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/DennisOSRM/Project-OSRM-Web/blob/master/WebContent/routing/OSRM.RoutingGeometry.js
|
|
10
|
+
*/
|
|
11
|
+
export declare const decodePolyline: (polyline: string, precision?: number) => GeoJSON.Position[];
|
|
12
|
+
/**
|
|
13
|
+
* Decode valhalla polyline shape to {@link GeoJSON.LineString}
|
|
14
|
+
*
|
|
15
|
+
* @param {String} polyline
|
|
16
|
+
* @param {Number} precision
|
|
17
|
+
*
|
|
18
|
+
* @returns {GeoJSON.LineString}
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const polylineToLineString: (polyline: string, precision?: number) => GeoJSON.LineString;
|
|
22
|
+
//# sourceMappingURL=decode-polyline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode-polyline.d.ts","sourceRoot":"","sources":["../src/decode-polyline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AAExC;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,aACb,MAAM,yBAEjB,QAAQ,QAAQ,EA6ClB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,aACnB,MAAM,yBAEjB,QAAQ,UAGT,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-bitwise */
|
|
3
|
+
/* eslint-disable no-plusplus */
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.polylineToLineString = exports.decodePolyline = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Decode a valhalla polyline to an array of {@link GeoJSON.Position}
|
|
8
|
+
*
|
|
9
|
+
* @param {String} polyline
|
|
10
|
+
* @param {Number} precision = 6
|
|
11
|
+
* @returns {@link GeoJSON.Position[]}
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/DennisOSRM/Project-OSRM-Web/blob/master/WebContent/routing/OSRM.RoutingGeometry.js
|
|
14
|
+
*/
|
|
15
|
+
const decodePolyline = (polyline, precision = 6) => {
|
|
16
|
+
let index = 0;
|
|
17
|
+
let lat = 0;
|
|
18
|
+
let lon = 0;
|
|
19
|
+
let result = 0;
|
|
20
|
+
let shift = 0;
|
|
21
|
+
let byte = null;
|
|
22
|
+
let dLatitude;
|
|
23
|
+
let dLongitude;
|
|
24
|
+
const factor = 10 ** precision;
|
|
25
|
+
const coordinates = [];
|
|
26
|
+
while (index < polyline.length) {
|
|
27
|
+
byte = 0x20;
|
|
28
|
+
shift = 0;
|
|
29
|
+
result = 0;
|
|
30
|
+
while (byte >= 0x20) {
|
|
31
|
+
byte = polyline.charCodeAt(index) - 63;
|
|
32
|
+
result |= (byte & 0x1f) << shift;
|
|
33
|
+
shift += 5;
|
|
34
|
+
index++;
|
|
35
|
+
}
|
|
36
|
+
dLatitude = result & 1 ? ~(result >> 1) : result >> 1;
|
|
37
|
+
byte = 0x20;
|
|
38
|
+
shift = 0;
|
|
39
|
+
result = 0;
|
|
40
|
+
while (byte >= 0x20) {
|
|
41
|
+
byte = polyline.charCodeAt(index) - 63;
|
|
42
|
+
result |= (byte & 0x1f) << shift;
|
|
43
|
+
shift += 5;
|
|
44
|
+
index++;
|
|
45
|
+
}
|
|
46
|
+
dLongitude = result & 1 ? ~(result >> 1) : result >> 1;
|
|
47
|
+
lat += dLatitude;
|
|
48
|
+
lon += dLongitude;
|
|
49
|
+
coordinates.push([lon / factor, lat / factor]);
|
|
50
|
+
}
|
|
51
|
+
return coordinates;
|
|
52
|
+
};
|
|
53
|
+
exports.decodePolyline = decodePolyline;
|
|
54
|
+
/**
|
|
55
|
+
* Decode valhalla polyline shape to {@link GeoJSON.LineString}
|
|
56
|
+
*
|
|
57
|
+
* @param {String} polyline
|
|
58
|
+
* @param {Number} precision
|
|
59
|
+
*
|
|
60
|
+
* @returns {GeoJSON.LineString}
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
const polylineToLineString = (polyline, precision = 6) => ({
|
|
64
|
+
type: 'LineString',
|
|
65
|
+
coordinates: (0, exports.decodePolyline)(polyline, precision),
|
|
66
|
+
});
|
|
67
|
+
exports.polylineToLineString = polylineToLineString;
|
|
68
|
+
//# sourceMappingURL=decode-polyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode-polyline.js","sourceRoot":"","sources":["../src/decode-polyline.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;;;AAIhC;;;;;;;;GAQG;AACI,MAAM,cAAc,GAAG,CAC1B,QAAgB,EAChB,SAAS,GAAG,CAAC,EACK,EAAE;IACpB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,SAAiB,CAAC;IACtB,IAAI,UAAkB,CAAC;IAEvB,MAAM,MAAM,GAAG,EAAE,IAAI,SAAS,CAAC;IAC/B,MAAM,WAAW,GAAuB,EAAE,CAAC;IAE3C,OAAO,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,CAAC;QACZ,KAAK,GAAG,CAAC,CAAC;QACV,MAAM,GAAG,CAAC,CAAC;QACX,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC;YAClB,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACvC,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,KAAK,CAAC;YACjC,KAAK,IAAI,CAAC,CAAC;YACX,KAAK,EAAE,CAAC;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oot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type StringBool = 'true' | 'false';
|
|
2
|
+
export type DateTimeType = 0 | 1 | 2 | 3;
|
|
3
|
+
export type DateTimeValue = string;
|
|
4
|
+
export type DateTime = {
|
|
5
|
+
type: DateTimeType;
|
|
6
|
+
value: DateTimeValue;
|
|
7
|
+
};
|
|
8
|
+
export type OuterPolygonRing = number[][];
|
|
9
|
+
export type DirectionsType = 'none' | 'maneuvers' | 'instructions';
|
|
10
|
+
export type UnitsOfDistance = 'miles' | 'kilometers' | 'km' | 'mi';
|
|
11
|
+
export type ShapeMatchType = 'edge_walk' | 'map_snap' | 'walk_or_snap';
|
|
12
|
+
export type TravelMode = 'drive' | 'pedestrian' | 'bicycle' | 'transit' | 'bikeshare';
|
|
13
|
+
export type TravelType = 'car' | 'foot' | 'road' | 'tram' | 'metro' | 'rail' | 'bus' | 'ferry' | 'cable_car' | 'gondola' | 'funicular';
|
|
14
|
+
export type BSSManeuverType = 'NoneAction' | 'RentBikeAtBikeShare' | 'ReturnBikeAtBikeShare';
|
|
15
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAQ1C,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,MAAM,QAAQ,GAAG;IACnB,IAAI,EAAE,YAAY,CAAC;IAEnB,KAAK,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,EAAE,EAAE,CAAC;AAE1C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,YAAY,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,CAAC;AAEvE,MAAM,MAAM,UAAU,GAChB,OAAO,GACP,YAAY,GACZ,SAAS,GACT,SAAS,GACT,WAAW,CAAC;AAElB,MAAM,MAAM,UAAU,GAChB,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,KAAK,GACL,OAAO,GACP,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAElB,MAAM,MAAM,eAAe,GACrB,YAAY,GACZ,qBAAqB,GACrB,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { StringBool } from './base';
|
|
2
|
+
/**
|
|
3
|
+
* Costing Models used in routing
|
|
4
|
+
*/
|
|
5
|
+
export type CostingModels = 'pedestrian' | 'bicycle' | 'auto' | 'bus' | 'bikeshare' | 'truck' | 'taxi' | 'motor_scooter' | 'motorcycle' | 'multimodal';
|
|
6
|
+
/**
|
|
7
|
+
* Automobile costing options that can be used during routing.
|
|
8
|
+
*/
|
|
9
|
+
export interface BaseMotorizedVehicleCostingOptions {
|
|
10
|
+
/**
|
|
11
|
+
* A penalty applied when transitioning between roads that do not have
|
|
12
|
+
* consistent naming–in other words, no road names in common.
|
|
13
|
+
* This penalty can be used to create simpler routes that tend to have
|
|
14
|
+
* fewer maneuvers or narrative guidance instructions.
|
|
15
|
+
* The default maneuver penalty is five seconds.
|
|
16
|
+
*/
|
|
17
|
+
maneuver_penalty?: number;
|
|
18
|
+
/**
|
|
19
|
+
* A cost applied when a gate with undefined or private access
|
|
20
|
+
* is encountered. This cost is added to the estimated time / elapsed time.
|
|
21
|
+
* The default gate cost is 30 seconds.
|
|
22
|
+
*/
|
|
23
|
+
gate_cost?: number;
|
|
24
|
+
/**
|
|
25
|
+
* A penalty applied when a gate with no access information is on the road.
|
|
26
|
+
* The default gate penalty is 300 seconds.
|
|
27
|
+
*/
|
|
28
|
+
gate_penalty?: number;
|
|
29
|
+
/**
|
|
30
|
+
* A penalty applied when a gate or bollard with access=private is encountered.
|
|
31
|
+
* The default private access penalty is 450 seconds.
|
|
32
|
+
*/
|
|
33
|
+
private_access_penalty?: number;
|
|
34
|
+
/**
|
|
35
|
+
* A cost applied when a toll booth is encountered.
|
|
36
|
+
* This cost is added to the estimated and elapsed times.
|
|
37
|
+
* The default cost is 15 seconds.
|
|
38
|
+
*/
|
|
39
|
+
toll_booth_cost?: number;
|
|
40
|
+
/**
|
|
41
|
+
* A penalty applied to the cost when a toll booth is encountered.
|
|
42
|
+
* This penalty can be used to create paths that avoid toll roads.
|
|
43
|
+
* The default toll booth penalty is 0.
|
|
44
|
+
*/
|
|
45
|
+
toll_booth_penalty?: number;
|
|
46
|
+
/**
|
|
47
|
+
* A cost applied when entering a ferry.
|
|
48
|
+
* This cost is added to the estimated and elapsed times.
|
|
49
|
+
* The default cost is 300 seconds (5 minutes).
|
|
50
|
+
*/
|
|
51
|
+
ferry_cost?: number;
|
|
52
|
+
/**
|
|
53
|
+
* This value indicates the willingness to take ferries.
|
|
54
|
+
* This is a range of values between 0 and 1.
|
|
55
|
+
* Values near 0 attempt to avoid ferries and values near 1 will favor ferries.
|
|
56
|
+
* The default value is 0.5.
|
|
57
|
+
*
|
|
58
|
+
* Note that sometimes ferries are required to complete a route so values of 0
|
|
59
|
+
* are not guaranteed to avoid ferries entirely.
|
|
60
|
+
*/
|
|
61
|
+
use_ferry?: number;
|
|
62
|
+
/**
|
|
63
|
+
* This value indicates the willingness to take highways.
|
|
64
|
+
* This is a range of values between 0 and 1.
|
|
65
|
+
* Values near 0 attempt to avoid highways and values near 1 will favor highways.
|
|
66
|
+
*
|
|
67
|
+
* The default value is 1.0.
|
|
68
|
+
*
|
|
69
|
+
* Note that sometimes highways are required to complete a route so values of 0
|
|
70
|
+
* are not guaranteed to avoid highways entirely.
|
|
71
|
+
*/
|
|
72
|
+
use_highways?: number;
|
|
73
|
+
/**
|
|
74
|
+
* This value indicates the willingness to take roads with tolls.
|
|
75
|
+
* This is a range of values between 0 and 1.
|
|
76
|
+
* Values near 0 attempt to avoid tolls and values near 1 will not attempt to avoid them.
|
|
77
|
+
* The default value is 0.5.
|
|
78
|
+
*
|
|
79
|
+
* Note that sometimes roads with tolls are required to complete a route so values of 0
|
|
80
|
+
* are not guaranteed to avoid them entirely.
|
|
81
|
+
*/
|
|
82
|
+
use_tolls?: number;
|
|
83
|
+
/**
|
|
84
|
+
* This value indicates the willingness to take living streets.
|
|
85
|
+
* This is a range of values between 0 and 1.
|
|
86
|
+
* Values near 0 attempt to avoid living streets and values near 1 will favor living streets.
|
|
87
|
+
* The default value is 0 for trucks, 0.1 for cars, buses, motor scooters and motorcycles.
|
|
88
|
+
*
|
|
89
|
+
* Note that sometimes living streets are required to complete a route so values of 0
|
|
90
|
+
* are not guaranteed to avoid living streets entirely.
|
|
91
|
+
*/
|
|
92
|
+
use_living_streets?: number;
|
|
93
|
+
/**
|
|
94
|
+
* This value indicates the willingness to take track roads.
|
|
95
|
+
* This is a range of values between 0 and 1.
|
|
96
|
+
* Values near 0 attempt to avoid tracks and values near 1 will favor tracks a little bit.
|
|
97
|
+
* The default value is 0 for autos, 0.5 for motor scooters and motorcycles.
|
|
98
|
+
path x*
|
|
99
|
+
* Note that sometimes tracks are required to complete a route so values of 0
|
|
100
|
+
* are not guaranteed to avoid tracks entirely.
|
|
101
|
+
*/
|
|
102
|
+
use_tracks?: number;
|
|
103
|
+
service_penalty?: number;
|
|
104
|
+
service_factor?: number;
|
|
105
|
+
country_crossing_cost?: number;
|
|
106
|
+
country_crossing_penalty?: number;
|
|
107
|
+
shortest?: StringBool;
|
|
108
|
+
top_speed?: number;
|
|
109
|
+
fixed_speed?: number;
|
|
110
|
+
ignore_closures?: StringBool;
|
|
111
|
+
closure_factor?: number;
|
|
112
|
+
}
|
|
113
|
+
export interface MotorizedVehicleCostingOptions extends BaseMotorizedVehicleCostingOptions {
|
|
114
|
+
height?: number;
|
|
115
|
+
width?: number;
|
|
116
|
+
exclude_unpaved?: 1 | 'false';
|
|
117
|
+
exclude_cash_only_tolls?: StringBool;
|
|
118
|
+
include_hov2?: StringBool;
|
|
119
|
+
include_hov3?: StringBool;
|
|
120
|
+
include_hot?: StringBool;
|
|
121
|
+
}
|
|
122
|
+
export interface TruckCostingOptions extends MotorizedVehicleCostingOptions {
|
|
123
|
+
length?: number;
|
|
124
|
+
weight?: number;
|
|
125
|
+
axle_load?: number;
|
|
126
|
+
axle_count?: number;
|
|
127
|
+
hazmat?: StringBool;
|
|
128
|
+
}
|
|
129
|
+
export interface PedestrianCostingOptions {
|
|
130
|
+
walking_speed?: number;
|
|
131
|
+
walkway_factor?: number;
|
|
132
|
+
sidewalk_factor?: number;
|
|
133
|
+
alley_factor?: number;
|
|
134
|
+
driveway_factor?: number;
|
|
135
|
+
step_penalty?: number;
|
|
136
|
+
use_hills?: number;
|
|
137
|
+
use_ferry?: number;
|
|
138
|
+
use_living_streets?: number;
|
|
139
|
+
/**
|
|
140
|
+
* This value indicates the willingness to take track roads.
|
|
141
|
+
* This is a range of values between 0 and 1.
|
|
142
|
+
* Values near 0 attempt to avoid tracks and values near 1 will favor tracks a little bit.
|
|
143
|
+
* The default value is 0 for autos, 0.5 for motor scooters and motorcycles.
|
|
144
|
+
*
|
|
145
|
+
* Note that sometimes tracks are required to complete a route so values of 0
|
|
146
|
+
* are not guaranteed to avoid tracks entirely.
|
|
147
|
+
*/
|
|
148
|
+
use_tracks?: number;
|
|
149
|
+
service_penalty?: number;
|
|
150
|
+
service_factor?: number;
|
|
151
|
+
max_hiking_difficulty?: number;
|
|
152
|
+
bss_return_cost?: number;
|
|
153
|
+
bss_return_penalty?: number;
|
|
154
|
+
shortest?: boolean;
|
|
155
|
+
}
|
|
156
|
+
export type BiycleType = 'Hybrid' | 'City' | 'Road' | 'Cross' | 'Mountain';
|
|
157
|
+
export interface BicycleCostingOptions {
|
|
158
|
+
bicycle_type?: BiycleType;
|
|
159
|
+
cycling_speed?: number;
|
|
160
|
+
use_roads?: number;
|
|
161
|
+
use_hills?: number;
|
|
162
|
+
use_ferry?: number;
|
|
163
|
+
use_living_streets?: number;
|
|
164
|
+
avoid_bad_surfaces?: number;
|
|
165
|
+
bss_return_cost?: number;
|
|
166
|
+
bss_return_penalty?: number;
|
|
167
|
+
shortest?: StringBool;
|
|
168
|
+
/**
|
|
169
|
+
* A penalty applied when transitioning between roads that do not have
|
|
170
|
+
* consistent naming–in other words, no road names in common.
|
|
171
|
+
* This penalty can be used to create simpler routes that tend to have
|
|
172
|
+
* fewer maneuvers or narrative guidance instructions.
|
|
173
|
+
* The default maneuver penalty is five seconds.
|
|
174
|
+
*/
|
|
175
|
+
maneuver_penalty?: number;
|
|
176
|
+
/**
|
|
177
|
+
* A cost applied when a gate with undefined or private access
|
|
178
|
+
* is encountered. This cost is added to the estimated time / elapsed time.
|
|
179
|
+
* The default gate cost is 30 seconds.
|
|
180
|
+
*/
|
|
181
|
+
gate_cost?: number;
|
|
182
|
+
/**
|
|
183
|
+
* A penalty applied when a gate with no access information is on the road.
|
|
184
|
+
* The default gate penalty is 300 seconds.
|
|
185
|
+
*/
|
|
186
|
+
gate_penalty?: number;
|
|
187
|
+
service_penalty?: number;
|
|
188
|
+
country_crossing_cost?: number;
|
|
189
|
+
country_crossing_penalty?: number;
|
|
190
|
+
}
|
|
191
|
+
export interface MotorScooterCostingOptions extends MotorizedVehicleCostingOptions {
|
|
192
|
+
top_speed?: number;
|
|
193
|
+
use_primary?: number;
|
|
194
|
+
use_hills?: number;
|
|
195
|
+
}
|
|
196
|
+
export interface MotorcycleCostingOptions extends MotorScooterCostingOptions {
|
|
197
|
+
/**
|
|
198
|
+
* This value indicates the willingness to take highways.
|
|
199
|
+
* This is a range of values between 0 and 1.
|
|
200
|
+
* Values near 0 attempt to avoid highways and values near 1 will favor highways.
|
|
201
|
+
* The default value is 1.0.
|
|
202
|
+
*
|
|
203
|
+
* Note that sometimes highways are required to complete a route so values of 0
|
|
204
|
+
* are not guaranteed to avoid highways entirely.
|
|
205
|
+
*/
|
|
206
|
+
use_highways?: number;
|
|
207
|
+
use_trial?: number;
|
|
208
|
+
}
|
|
209
|
+
export type TransitCostingFilter = {
|
|
210
|
+
ids: string[];
|
|
211
|
+
action: 'exclude' | 'include';
|
|
212
|
+
};
|
|
213
|
+
export interface TransitCostingOptions {
|
|
214
|
+
use_bus?: number;
|
|
215
|
+
use_rail?: number;
|
|
216
|
+
use_transfers?: number;
|
|
217
|
+
transit_start_end_max_distance?: number;
|
|
218
|
+
transit_transfer_max_distance?: number;
|
|
219
|
+
filters?: TransitCostingFilter[];
|
|
220
|
+
}
|
|
221
|
+
export type CostingOptions = {
|
|
222
|
+
auto?: MotorizedVehicleCostingOptions;
|
|
223
|
+
taxi?: MotorizedVehicleCostingOptions;
|
|
224
|
+
bus?: MotorizedVehicleCostingOptions;
|
|
225
|
+
bicycle?: BicycleCostingOptions;
|
|
226
|
+
pedestrian?: PedestrianCostingOptions;
|
|
227
|
+
truck?: TruckCostingOptions;
|
|
228
|
+
motorcycle?: MotorcycleCostingOptions;
|
|
229
|
+
motor_scooter?: MotorScooterCostingOptions;
|
|
230
|
+
multimodal?: TransitCostingOptions;
|
|
231
|
+
};
|
|
232
|
+
//# sourceMappingURL=costing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"costing.d.ts","sourceRoot":"","sources":["../../src/types/costing.ts"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AAC,EAAE,MAAM,CAAC;IAMjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,aAAa,CAAC,EAAE,MAAM,CAAC;IAOvB,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAMxC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IAQvC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,CAAC,EAAE,8BAA8B,CAAC;IACtC,IAAI,CAAC,EAAE,8BAA8B,CAAC;IACtC,GAAG,CAAC,EAAE,8BAA8B,CAAC;IACrC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"costing.js","sourceRoot":"","sources":["../../src/types/costing.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAK1B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './base';
|
|
2
|
+
export * from './costing';
|
|
3
|
+
export * from './error';
|
|
4
|
+
export * from './languages';
|
|
5
|
+
export * from './locations';
|
|
6
|
+
export * from './maneuver';
|
|
7
|
+
export * from './request';
|
|
8
|
+
export * from './response';
|
|
9
|
+
export * from './tracing';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base"), exports);
|
|
18
|
+
__exportStar(require("./costing"), exports);
|
|
19
|
+
__exportStar(require("./error"), exports);
|
|
20
|
+
__exportStar(require("./languages"), exports);
|
|
21
|
+
__exportStar(require("./locations"), exports);
|
|
22
|
+
__exportStar(require("./maneuver"), exports);
|
|
23
|
+
__exportStar(require("./request"), exports);
|
|
24
|
+
__exportStar(require("./response"), exports);
|
|
25
|
+
__exportStar(require("./tracing"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,0CAAwB;AACxB,8CAA4B;AAC5B,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type SupportedLanguageTags = 'bg-BG' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-GB' | 'en-US-x-pirate' | 'en-US' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-FR' | 'hi-IN' | 'hu-HU' | 'it-IT' | 'ja-JP' | 'nb-NO' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sl-SI' | 'sv-SE' | 'tr-TR' | 'uk-UA';
|
|
2
|
+
export type SupportedLanguageAlias = 'bg' | 'ca' | 'cs' | 'da' | 'de' | 'el' | 'en-x-pirate' | 'en' | 'es' | 'et' | 'fi' | 'fr' | 'hi' | 'hu' | 'it' | 'ja' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk';
|
|
3
|
+
//# sourceMappingURL=languages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/types/languages.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC3B,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEd,MAAM,MAAM,sBAAsB,GAC5B,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,aAAa,GACb,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/types/languages.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { StringBool } from './base';
|
|
2
|
+
/**
|
|
3
|
+
* Road classes used in routing
|
|
4
|
+
*/
|
|
5
|
+
export type RoadClass = 'motorway' | 'trunk' | 'primary' | 'secondary' | 'tertiary' | 'unclassified' | 'residential' | 'service_other';
|
|
6
|
+
export type PreferredSide = 'same' | 'opposite' | 'either';
|
|
7
|
+
export type LocationType = 'break' | 'break_through' | 'through' | 'via';
|
|
8
|
+
type LocationSearchFilter = {
|
|
9
|
+
exclude_tunnel?: StringBool;
|
|
10
|
+
exclude_bridge?: StringBool;
|
|
11
|
+
exclude_ramp?: StringBool;
|
|
12
|
+
exclude_closure?: StringBool;
|
|
13
|
+
min_road_class?: RoadClass;
|
|
14
|
+
max_road_class?: RoadClass;
|
|
15
|
+
};
|
|
16
|
+
export interface Position {
|
|
17
|
+
lat: number;
|
|
18
|
+
lon: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ResponseLocation extends Position {
|
|
21
|
+
original_index: number;
|
|
22
|
+
type: LocationType;
|
|
23
|
+
}
|
|
24
|
+
export interface RequestLocation extends Omit<ResponseLocation, 'original_index' | 'type'> {
|
|
25
|
+
name?: string;
|
|
26
|
+
city?: string;
|
|
27
|
+
state?: string;
|
|
28
|
+
postal_code?: string;
|
|
29
|
+
country?: string;
|
|
30
|
+
phone?: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
waiting?: number;
|
|
33
|
+
heading?: number;
|
|
34
|
+
heading_tolerance?: number;
|
|
35
|
+
street?: string;
|
|
36
|
+
way_id?: number;
|
|
37
|
+
minimum_reachability?: number;
|
|
38
|
+
radius?: number;
|
|
39
|
+
rank_candidates?: StringBool;
|
|
40
|
+
preferred_side?: PreferredSide;
|
|
41
|
+
display_lat?: number;
|
|
42
|
+
display_lon?: number;
|
|
43
|
+
search_cutoff?: number;
|
|
44
|
+
node_snap_tolerance?: number;
|
|
45
|
+
street_side_tolerance?: number;
|
|
46
|
+
streetside_max_distance?: number;
|
|
47
|
+
search_filter?: LocationSearchFilter;
|
|
48
|
+
}
|
|
49
|
+
export interface LatLng {
|
|
50
|
+
lat: number;
|
|
51
|
+
lon: number;
|
|
52
|
+
time?: number;
|
|
53
|
+
type?: LocationType;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=locations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locations.d.ts","sourceRoot":"","sources":["../../src/types/locations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,SAAS,GACf,UAAU,GACV,OAAO,GACP,SAAS,GACT,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,eAAe,CAAC;AAEtB,MAAM,MAAM,aAA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