Loader for Google Maps v3
NOTE: This package has been deprecated in favor of @googlemaps/js-api-loader. The interface remains the same.
Load the Google Maps V3 script dynamically. This takes inspiration from the google-maps npm package but updates it with ES6, Promises, and TypeScript.
Available via NPM as the package
The reference documentation can be found at this link.
;const loader =apiKey: ""version: "weekly"libraries: "places";const mapOptions =center:lat: 0lng: 0zoom: 4;
Using a promise for when the script has loaded.
Alternatively, if you want to use a callback.
View the package in action here.
This library is community supported. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it.