load-gmaps
v0.1.1
Published
Load the Google Maps script asynchronously.
Downloads
7
Readme
Load Gmaps
Asynchronously load Google Maps script.
Usage
Make sure to include a Promise polyfill for browsers that don’t support it natively. es6-promise seems to do a nice job.
var loadGmaps = require('load-gmaps');
// Set version to load (Optional).
loadGmaps.version = '3.19';
loadGmaps().then(function (mapsApi) {
// Create a map.
var map = new mapsApi.Map(/* options */);
});