1.0.1 • Published 4 years ago

js-google-maps-api v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Google Maps API for JavaScript

This repository contains a JavaScript package that allows you to access the Google Maps JavaScript API from your JavaScript project.

Installation

This package can be installed with NPM. Run this command:

npm install js-google-maps-api

Usage

Simple example of using the Google Maps JavaScript API.

import googleMapsApi from './google-maps-api'

// Load the Google Maps API.
googleMapsApi({
    key: '{google-maps-api-key}', // required
    libraries: ['places'],        // optional
                                  // other optional parameters
}).then((api) => {
    // Use the api, eg:
    let autocomplete = new api.places.Autocomplete(/** params */);
})

// Use the Google Maps API.
googleMapsApi().then((api) => {
    // Use the api, eg:
    let autocomplete = new api.places.Autocomplete(/** params */);
})
1.0.1

4 years ago

1.0.0

4 years ago