@googlemaps/google-maps-services-js
Advanced tools
Comparing version 2.5.2 to 2.5.3
@@ -1,2 +0,2 @@ | ||
## [2.5.2](https://github.com/googlemaps/google-maps-services-js/compare/v2.5.1...v2.5.2) (2020-04-10) | ||
## [2.5.3](https://github.com/googlemaps/google-maps-services-js/compare/v2.5.2...v2.5.3) (2020-04-13) | ||
@@ -6,3 +6,3 @@ | ||
* add additional AddressTypes ([#389](https://github.com/googlemaps/google-maps-services-js/issues/389)) ([5e9d038](https://github.com/googlemaps/google-maps-services-js/commit/5e9d038019cfc23928321f92c07413968a827535)) | ||
* use correct handling of optimize ([#392](https://github.com/googlemaps/google-maps-services-js/issues/392)) ([fcde060](https://github.com/googlemaps/google-maps-services-js/commit/fcde060e968d980a780cb1b51e21f21460e969a5)) | ||
@@ -9,0 +9,0 @@ ## [2.0.2](https://github.com/googlemaps/google-maps-services-js/compare/v2.0.1...v2.0.2) (2020-02-08) |
@@ -60,3 +60,3 @@ /** | ||
*/ | ||
waypoints?: LatLng[]; | ||
waypoints?: (string | LatLng)[]; | ||
/** | ||
@@ -63,0 +63,0 @@ * If set to `true`, specifies that the Directions service may provide more than one route alternative in the response. |
@@ -35,8 +35,15 @@ "use strict"; | ||
destination: serialize_1.latLngToString, | ||
waypoints: o => o.map(serialize_1.latLngToString), | ||
waypoints: (o) => o.map(serialize_1.latLngToString), | ||
arrival_time: serialize_1.toTimestamp, | ||
departure_time: serialize_1.toTimestamp | ||
departure_time: serialize_1.toTimestamp, | ||
}); | ||
function directions(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); | ||
const { optimize } = params; | ||
// optimize is passed as the first of the waypoint pipe array | ||
// &waypoints=optimize:true|Barossa+Valley,SA|Clare,SA|Connawarra,SA|McLaren+Vale,SA | ||
if (optimize) { | ||
params.waypoints = ["optimize:true", ...params.waypoints]; | ||
} | ||
delete params.optimize; | ||
return axiosInstance(Object.assign({ params, | ||
@@ -43,0 +50,0 @@ method, |
{ | ||
"name": "@googlemaps/google-maps-services-js", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "Node.js client library for Google Maps API Web Services", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307788
4965