Async loader for google maps api.
Version >= 4.0.0: Typescript definitions are published with this package. Install @types/google-maps
for previous versions.
This module does not change original google maps api in any way. It just provide easy way to load and use this API asynchronously.
Browser only!
Installation$ npm install --save google-maps
or with Pika:
Usage<script type="module">
    import { Loader } from 'https://cdn.pika.dev/google-maps';
   Â
</script>Â
import {Loader, LoaderOptions} from 'google-maps';
Â
const options: LoaderOptions = {};
const loader = new Loader('my-api-key', options);
Â
const google = await loader.load();
const map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -34.397, lng: 150.644},
    zoom: 8,
});
Without await/async:
Optionsloader.load().then(function (google) {
    const map = new google.maps.Map(document.getElementById('map'), {
        center: {lat: -34.397, lng: 150.644},
        zoom: 8,
    });
});
version
: https://developers.google.com/maps/documentation/javascript/versionsclient
: https://developers.google.com/maps/documentation/javascript/get-api-key#client-idchannel
: https://developers.google.com/maps/premium/reports/usage-reports#channelslanguage
: https://developers.google.com/maps/documentation/javascript/localizationregion
: https://developers.google.com/maps/documentation/javascript/localization#Regionlibraries
: https://developers.google.com/maps/documentation/javascript/libraries4.2.3
4.2.2
clientID
#774.2.0
4.1.1
4.1.0
4.0.0
3.2.1
3.2.0
3.1.0
3.0.0
2.1.1
2.1.0
2.0.0
1.0.0
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4