google-maps-api-loader
Conditionally load the Google Maps API in an ES6 promise
🌟 Show real-time usage chart on google-maps-api-loader's README.md, just copy the code below.## Usage Trend
[](https://npm-compare.com/google-maps-api-loader#timeRange=THREE_YEARS)
🌟 Show GitHub stars trend chart on google-maps-api-loader's README.md, just copy the code below.## GitHub Stars Trend
[](https://npm-compare.com/google-maps-api-loader)
Google Maps API Loader

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