
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
google-maps-js-api-loader
Advanced tools
Async loader for Maps JavaScript API
import Loader from "google-maps-js-api-loader";
Loader.setOptions({
apiKey: API_KEY,
// ...some other options
});
await Loader.load();
static setOptions(options: LoaderOptions): void
Loader options should be set before load execution
LoaderOptions | Description | |
---|---|---|
apiKey | Your API key. The Maps JavaScript API will not load unless a valid API key is specified | |
version? | The version of the Maps JavaScript API to use | |
libraries? | Array of additional Maps JavaScript API libraries to load | |
language? | The language to use. This affects the names of controls, copyright notices, driving directions, and control labels, as well as the responses to service requests. See the list of supported languages | |
region? | The region code to use. This alters the map's behavior based on a given country or territory | |
authReferrerPolicy? | Maps JS customers can configure HTTP Referrer Restrictions in the Cloud Console to limit which URLs are allowed to use a particular API Key. By default, these restrictions can be configured to allow only certain paths to use an API Key. If any URL on the same domain or origin may use the API Key, you can set "origin" to limit the amount of data sent when authorizing requests from the Maps JavaScript API . This is available starting in version 3.46. When this parameter is specified and HTTP Referrer Restrictions are enabled on Cloud Console, Maps JavaScript API will only be able to load if there is an HTTP Referrer Restriction that matches the current website's domain without a path specified | |
url? | Use a custom url and path to load the Google Maps API script | |
nonce? | Adds nonce attribute to the script | |
async? | Adds async attribute to the script | |
defer? | Adds defer attribute to the script | |
retryCount? | Number of retries if script loading fails | 2 |
retryDelay? | Delay between retries | 2000 |
static load(): Promise<void>
On the first call, it starts loading the Maps JavaScript API
with the given options
Returns completion
enum LoaderStatus {
NONE, // default value
LOADING,
LOADED,
ERROR,
}
static status: LoaderStatus
Current status of Loader
static readonly completion: Promise<void>
Promise of loading
Resolves if load is success
Rejects when
Maps JavaScript API
was loaded outside of this librarystatic onLoadingStart?(): void
Callback which will be fired after loading starts
MIT © Krombik
FAQs
A lightweight JavaScript library for loading the Google Maps JavaScript API
The npm package google-maps-js-api-loader receives a total of 103 weekly downloads. As such, google-maps-js-api-loader popularity was classified as not popular.
We found that google-maps-js-api-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.