@@ -42,32 +42,13 @@ export interface LoaderOptions {
42
42
*/
43
43
apiKey : string ;
44
44
/**
45
- * To track usage across different applications using the same client ID,
46
- * you may provide an optional channel parameter with your requests. By
47
- * specifying different channel values for different aspects of your
48
- * application, you can determine precisely how your application is used.
49
- *
50
- * For example, your externally-facing website may access the API using a
51
- * channel set to customer while your internal marketing department may use
52
- * a channel set to mkting. Your reports will break down usage by those
53
- * channel values.
54
- *
55
- * Channel reporting is available for applications using the Maps JavaScript
56
- * API, the image APIs or any of the Google Maps Platform web services.
57
- *
58
- * The channel parameter must use the following format:
59
- *
60
- * - Must be an ASCII alphanumeric string.
61
- * - Period (.), underscore (_) and hyphen (-) characters are allowed.
62
- * - The channel parameter is case-insensitive; upper-case, mixed-case, and
63
- * lower-cased channel parameters will be merged into their lower-case
64
- * equivalent. For example, usage on the `CUSTOMER` channel will be combined
65
- * with the usage on the `customer` channel.
66
- * - The channel value must be a static value assigned per application
67
- * instance, and must not be generated dynamically. You may not use
68
- * channel values to track individual users, for example.
45
+ * @deprecated See https://developers.google.com/maps/premium/overview.
69
46
*/
70
47
channel ?: string ;
48
+ /**
49
+ * @deprecated See https://developers.google.com/maps/premium/overview, use `apiKey` instead.
50
+ */
51
+ client ?: string ;
71
52
/**
72
53
* In your application you can specify release channels or version numbers:
73
54
*
@@ -205,11 +186,15 @@ export class Loader {
205
186
*/
206
187
apiKey : string ;
207
188
/**
208
- * See [[LoaderOptions.id ]]
189
+ * See [[LoaderOptions.channel ]]
209
190
*/
210
191
channel : string ;
211
192
/**
212
- * See [[LoaderOptions.channel]]
193
+ * See [[LoaderOptions.client]]
194
+ */
195
+ client : string ;
196
+ /**
197
+ * See [[LoaderOptions.id]]
213
198
*/
214
199
id : string ;
215
200
/**
@@ -259,6 +244,7 @@ export class Loader {
259
244
constructor ( {
260
245
apiKey,
261
246
channel,
247
+ client,
262
248
id = "__googleMapsScriptId" ,
263
249
libraries = [ ] ,
264
250
language,
@@ -271,6 +257,7 @@ export class Loader {
271
257
this . version = version ;
272
258
this . apiKey = apiKey ;
273
259
this . channel = channel ;
260
+ this . client = client ;
274
261
this . id = id ;
275
262
this . libraries = libraries ;
276
263
this . language = language ;
@@ -297,6 +284,10 @@ export class Loader {
297
284
url += `&channel=${ this . channel } ` ;
298
285
}
299
286
287
+ if ( this . client ) {
288
+ url += `&client=${ this . client } ` ;
289
+ }
290
+
300
291
if ( this . libraries . length > 0 ) {
301
292
url += `&libraries=${ this . libraries . join ( "," ) } ` ;
302
293
}
0 commit comments