All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING: Renamed models containing Valhalla and Pelias in their names to be generic. These now have rout(e|ing) or geocod(e|ing) prefixes.
- Explicitly documented more properties to the geocoding feature model.
- Adds support for the
foursquare
data source. - Documents the elevation_interval parameter on certain routing requests.
- BREAKING: Removed
isRouteResponse
andisOsrmRouteResponse
helper functions as these were duplicated.
You can migrate to the equivalent instanceOfRouteResponse
and instanceOfOsrmRouteResponse
methods.
- Support for the OSRM format and navigation aids
- BREAKING: To support the new format, the response type of directions APIs has changed
TypeScript users will need to use a type guard in order to check the type of the response for directions APIs, as the response type is now a union. The response format will depend on the value of the format parameter in your request.
Here is an example of how to do the check in your code. The guard helper function is included in this SDK and exported publicly.
const res = await api.route({ routeRequest: routeRequest });
if (instanceOfRouteResponse(res)) {
// TODO: Process the response
} else {
fail("Expected a Valhalla JSON format route response");
}
Alternately, you can guard for OSRM format responses like this:
const res = await api.route({ routeRequest: osrmFormatRouteRequest });
if (instanceOfOsrmRouteResponse(res)) {
// TODO: Process the response
} else {
fail("Expected an OSRM format route response");
}
- Improve modeling of bulk geocoding
- Isochrone request models now support all costing models
- Add support for bulk geocoding
- Add support for elevation in route responses
- Add support for low-speed vehicle routing
- The matrix endpoint now accepts its own model rather than coordinate. This includes a search cutoff and paves the way for future expansion.
- Improved the documentation of the matrix endpoint failure modes
- The time and distance field on matrix source to target models are now marked as nullable
ignore_
options for ignoring various restrictions (useful for certain map matching applications)
- Mark package as pure to enable
webpack
tree shaking
- BREAKING: Directions Options are moved from a nested object to the root of all turn-by-turn directions APIs. Simply remove the nesting.
- FIXED: Reflect upstream changes to the time/distance matrix API returning a single dimensional list of sources and targets; the extra layer of nesting is removed and may break existing code (this was a bug fix).
- Improved documentation strings.
- Alley factor for auto costing
- Resample distance parameter to height (elevation) requests
- Support for requesting alternate routes
- Support TypeScript 4.7+ exports
- Add missing cases to the travel type enum
- Improve the documentation of ranged elevation responses
- Add missing
type
to isochrone responses
- Corrected typo in the
locality_gid
field name - Add missing
bbox
property to GeoJSON features
npm
metadata updates- Minor README improvements
Initial release!