Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yujinlim/google-maps-direction
a simple google map direction api without requiring api key (by default)
https://github.com/yujinlim/google-maps-direction
Last synced: 2 months ago
JSON representation
a simple google map direction api without requiring api key (by default)
- Host: GitHub
- URL: https://github.com/yujinlim/google-maps-direction
- Owner: yujinlim
- License: mit
- Created: 2015-11-12T11:24:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-12T15:52:44.000Z (about 9 years ago)
- Last Synced: 2024-09-26T03:15:32.881Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Maps Direction API [![Build Status](https://travis-ci.org/yujinlim/google-maps-direction.svg?branch=master)](https://travis-ci.org/yujinlim/google-maps-direction)
> a simple google map direction api without requiring api key (by default)## Install
```
npm i --save google-maps-direction
```## Usage
```JS
var direction = require('google-maps-direction');direction({
origin: 'bukit damansara',
destination: 'klcc'
})
.then(function(result){
// return result
// routes: [...],
// geocoded_waypoints: [...],
// status: "OK"
});
```## API
### direction(options)
Returns Promise object#### options
Type: `Object`
##### origin
`Required`
Type: `String`
From which location
##### destination
`Required`
Type: `String`
To which locationfor more information about parameters, please read more [here](https://developers.google.com/maps/documentation/directions/intro#RequestParameters)
## Related
- [`google-maps-direction-cli`](https://github.com/yujinlim/google-maps-direction-cli)