Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    google-directions-polylinepublic

    google-directions-polyline

    Build Status

    A client for bulk querying polylines from the Google Directions API. The client optimizes queries by retrieving up to nine polylines per request and throttling requests to meet rate limits.

    Usage

    var client = require('google-directions-polyline').create({
        key: 'YOUR_KEY'
    })
    var bounds = [
        [ origin1, destination1 ],
        [ origin2, destination2 ],
        // ...
        [ originN, destinationN ]
    ]
     
    client.getPolylines(bounds)
        .then(function(polylines){
     
        })
     
    // or...
     
    client.getGeoJSON(bounds)
        .then(function(featureCollection){
     
        })

    Where origin and destination have the form [ lat, lon ].

    Installation

    $ npm install google-directions-polyline
    

    License

    MIT, see LICENSE for details.

    Keywords

    none

    install

    npm i google-directions-polyline

    Downloadsweekly downloads

    3

    version

    0.0.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar