Creates an instance of Loader using [[LoaderOptions]]. No defaults are set using this library, instead the defaults are set by the Google Maps JavaScript API server.
const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
ReadonlyapiSee [[LoaderOptions.apiKey]]
ReadonlyauthSee [[LoaderOptions.authReferrerPolicy]]
ReadonlychannelSee [[LoaderOptions.channel]]
ReadonlyclientSee [[LoaderOptions.client]]
ReadonlyidSee [[LoaderOptions.id]]
ReadonlylanguageSee [[LoaderOptions.language]]
ReadonlylibrariesSee [[LoaderOptions.libraries]]
ReadonlymapSee [[LoaderOptions.mapIds]]
ReadonlynonceSee [[LoaderOptions.nonce]]
ReadonlyregionSee [[LoaderOptions.region]]
ReadonlyretriesSee [[LoaderOptions.retries]]
ReadonlyurlSee [[LoaderOptions.url]]
ReadonlyversionSee [[LoaderOptions.version]]
Load the Google Maps JavaScript API script and return a Promise. @deprecated, use importLibrary() instead.
Load the Google Maps JavaScript API script with a callback. @deprecated, use importLibrary() instead.
[[Loader]] makes it easier to add Google Maps JavaScript API to your application dynamically using Promises. It works by dynamically creating and appending a script node to the the document head and wrapping the callback function so as to return a promise.