google-maps-api-loader
Conditionally load the Google Maps API in an ES6 promise

google-maps-api-loader downloads google-maps-api-loader version google-maps-api-loader license

google-maps-api-loaderSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on google-maps-api-loader's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of google-maps-api-loader](https://npm-compare.com/img/npm-trend/THREE_YEARS/google-maps-api-loader.png)](https://npm-compare.com/google-maps-api-loader#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on google-maps-api-loader's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of google-maps-api-loader](https://npm-compare.com/img/github-trend/google-maps-api-loader.png)](https://npm-compare.com/google-maps-api-loader)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
google-maps-api-loader8,01040-08 years agoMIT
README for google-maps-api-loader

Google Maps API Loader

npm travis Dependency Status devDependency Status

Provides a convenient wrapper for the Google Maps API, allowing it to be called in the promise syntax.

Installation

$ npm install --save google-maps-api-loader

Usage


var GoogleMapsApiLoader = require('google-maps-api-loader');

GoogleMapsApiLoader({
        libraries: ['places'],
        apiKey: 'your-api-key' // optional
    })
    .then(function(googleApi) {
        var autocomplete = new googleApi.maps.places.AutocompleteService();
    }, function(err) {
        console.error(err);
    });

License

MIT