You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-76Lines changed: 58 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,32 @@
14
14
# Google Maps JavaScript API Loader
15
15
16
16
## Description
17
-
Load the Google Maps JavaScript API script dynamically. This takes inspiration from the [google-maps](https://www.npmjs.com/package/google-maps) npm package but updates it with ES6, Promises, and TypeScript.
17
+
18
+
Load the Google Maps JavaScript API script dynamically. This is essentially
19
+
an npm version of the [Dynamic Library Import](https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import)
20
+
script.
18
21
19
22
## Requirements
20
23
21
-
*[Sign up with Google Maps Platform]
22
-
* A Google Maps Platform [project] with the [**Maps Javascript API**][maps-sdk] enabled
23
-
* An [API key] associated with the project above
24
-
*[@googlemaps/js-api-loader NPM package][npm-pkg]
24
+
-[Sign up with Google Maps Platform]
25
+
- A Google Cloud Platform [project] with the [**Maps JavaScript API**]
26
+
[maps-sdk] enabled
27
+
- An [API key] associated with the project above
28
+
-[@googlemaps/js-api-loader NPM package][npm-pkg]
25
29
26
30
## Installation
27
31
28
-
Install the [@googlemaps/js-api-loader NPM package][npm-pkg] with:
32
+
Install the [`@googlemaps/js-api-loader` NPM package][npm-pkg] with:
29
33
30
34
```sh
31
-
npm i @googlemaps/js-api-loader
35
+
npm install @googlemaps/js-api-loader
32
36
```
33
37
34
-
Alternatively you may add the umd package directly to the html document using the unpkg link.
38
+
Alternatively you may add the UMD package directly to the html document using
When adding via unpkg, the loader can be accessed at `google.maps.plugins.loader.Loader`.
@@ -44,106 +49,83 @@ When adding via unpkg, the loader can be accessed at `google.maps.plugins.loader
44
49
TypeScript users need to install the following types package.
45
50
46
51
```sh
47
-
npm i -D @types/google.maps
52
+
npm install --save-dev @types/google.maps
48
53
```
49
54
50
55
## Documentation
51
56
52
-
The reference documentation can be found at this [link](https://googlemaps.github.io/js-api-loader/index.html). The Google Maps JavaScript API [documentation](https://developers.google.com/maps/documentation/javascript/tutorial) is the authoritative source for the loader options.
57
+
The reference documentation can be found at this [link][reference]. The Google
58
+
Maps JavaScript API documentation is the authoritative source for the loader options.
View the package in action [here](https://googlemaps.github.io/js-api-loader/examples/index.html).
117
-
118
86
## Contributing
119
87
120
-
Contributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].
88
+
Contributions are welcome and encouraged! If you'd like to contribute, send
89
+
us a [pull request] and refer to our [code of conduct] and [contributing guide].
121
90
122
91
## Terms of Service
123
92
124
-
This library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform [Terms of Service].
93
+
This library uses Google Maps Platform services. Use of Google Maps
94
+
Platform services through this library is subject to the Google Maps
95
+
Platform [Terms of Service].
125
96
126
-
This library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.
97
+
This library is not a Google Maps Platform Core Service. Therefore, the
98
+
Google Maps Platform Terms of Service (e.g. Technical Support Services,
99
+
Service Level Agreements, and Deprecation Policy) do not apply to the code
100
+
in this library.
127
101
128
102
### European Economic Area (EEA) developers
129
103
130
104
If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq).
131
105
132
106
## Support
133
107
134
-
This library is offered via an open source [license]. It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines, the SLA, or the [Deprecation Policy]. However, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service.
108
+
This library is offered via an open source [license]. It is not governed by
109
+
the Google Maps Platform Support [Technical Support Services Guidelines],
110
+
the [SLA], or the [Deprecation Policy]. However, any Google Maps Platform
111
+
services used by the library remain subject to the Google Maps Platform Terms of Service.
135
112
136
-
This library adheres to [semantic versioning] to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.
113
+
This library adheres to [semantic versioning] to indicate when
114
+
backwards-incompatible changes are introduced.
137
115
138
-
If you find a bug, or have a feature request, please [file an issue] on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels]. If you'd like to contribute, please check the [contributing guide].
116
+
If you find a bug, or have a feature request, please [file an issue] on
117
+
GitHub. If you would like to get answers to technical questions from other
118
+
Google Maps Platform developers, ask through one of our
119
+
[developer community channels].
120
+
If you'd like to contribute, please check the [contributing guide].
139
121
140
122
You can also discuss this library on our [Discord server].
0 commit comments