Socket
Socket
Sign inDemoInstall

google-distance-matrix

Package Overview
Dependencies
51
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "google-distance-matrix",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Node.js wrapper for Google Maps Distance Matrix API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -41,3 +41,3 @@ # Node.js wrapper for Google Distance Matrix API

* If using **client** and **signature**:
If using **client** and **signature**:

@@ -53,3 +53,3 @@ 1. Create environment variables `GOOGLE_CLIENT_KEY` and `GOOGLE_SIGNATURE_KEY`, or...

Mode (optional): `driving | walking | bicycling`, default `driving`
Mode (optional): `driving | walking | bicycling | transit`, default `driving`

@@ -66,3 +66,3 @@ ```javascript

Avoid (optional): `tolls | highways | ferries`, default: `null`
Avoid (optional): `tolls | highways | ferries | indoor`, default: `null`

@@ -91,2 +91,20 @@ ```javascript

Traffic model (this parameter may only be specified for requests where the travel mode is `driving`, and where the request includes a `departure_time`): `best_guess | pessimistic | optimistic`, default `best_guess`
```javascript
distance.traffic_model('optimistic');
```
Transit mode (this parameter may only be specified for requests where the `mode` is `transit`): `bus | subway | train | tram | rail`
```javascript
distance.transit_mode('rail');
```
Transit routing preference (this parameter may only be specified for requests where the `mode` is `transit`): `less_walking | fewer_transfers`
```javascript
distance.transit_routing_preference('fewer_transfers');
```
### Origins

@@ -93,0 +111,0 @@ An array of one or more addresses and/or textual latitude/longitude values from which to calculate distance and time. If you pass an address as a string, the service will geocode the string and convert it to a latitude/longitude coordinate to calculate directions. If you pass coordinates, ensure that no space exists between the latitude and longitude values.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc