🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

google-maps-api-loader

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-maps-api-loader

Conditionally load the Google Maps API in an ES6 promise

1.1.1
latest
Source
npm
Version published
Weekly downloads
11K
1.27%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

google-maps

FAQs

Package last updated on 23 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts