MCPcopy Create free account
hub / github.com/googlemaps/js-api-loader / setOptions

Function setOptions

src/index.ts:77–94  ·  view source on GitHub ↗
(options: APIOptions)

Source from the content-addressed store, hash-verified

75 * @param options The options to set.
76 */
77export function setOptions(options: APIOptions) {
78 if (setOptionsWasCalled_) {
79 logDevWarning(MSG_REPEATED_SET_OPTIONS(options));
80
81 return;
82 }
83
84 if ((options as Record<string, unknown>).apiKey) {
85 logDevWarning(MSG_API_KEY_USED);
86
87 if (!options.key) {
88 options.key = (options as Record<string, unknown>).apiKey as string;
89 }
90 }
91
92 installImportLibrary_(options);
93 setOptionsWasCalled_ = true;
94}
95
96/**
97 * Imports the specified library from the Maps JavaScript API.

Callers 4

index.jsFile · 0.85
index.jsFile · 0.85
main.jsFile · 0.85
index.test.tsFile · 0.85

Calls 2

MSG_REPEATED_SET_OPTIONSFunction · 0.85
installImportLibrary_Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…