@maptiler/client 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/maptiler-client.cjs +465 -21
  2. package/dist/maptiler-client.cjs.map +1 -1
  3. package/dist/maptiler-client.d.ts +395 -2
  4. package/dist/maptiler-client.min.mjs +1 -1
  5. package/dist/maptiler-client.mjs +461 -22
  6. package/dist/maptiler-client.mjs.map +1 -1
  7. package/dist/maptiler-client.umd.js +465 -21
  8. package/dist/maptiler-client.umd.js.map +1 -1
  9. package/dist/maptiler-client.umd.min.js +1 -1
  10. package/docs/assets/custom.css +28 -1
  11. package/docs/classes/config.ClientConfig.html +9 -9
  12. package/docs/classes/services_ServiceError.ServiceError.html +7 -7
  13. package/docs/functions/language.getAutoLanguageGeocoding.html +5 -5
  14. package/docs/functions/services_simplify.default.html +5 -5
  15. package/docs/index.html +98 -10
  16. package/docs/modules/config.html +5 -5
  17. package/docs/modules/language.html +5 -5
  18. package/docs/modules/services_ServiceError.html +5 -5
  19. package/docs/modules/services_coordinates.html +5 -5
  20. package/docs/modules/services_data.html +5 -5
  21. package/docs/modules/services_geocoding.html +5 -5
  22. package/docs/modules/services_geolocation.html +5 -5
  23. package/docs/modules/services_simplify.html +5 -5
  24. package/docs/modules/services_staticMaps.html +5 -5
  25. package/docs/modules.html +4 -4
  26. package/docs/types/config.FetchFunction.html +5 -5
  27. package/docs/types/language.LanguageGeocodingString.html +5 -5
  28. package/docs/types/services_coordinates.CoordinateExport.html +5 -5
  29. package/docs/types/services_coordinates.CoordinateGrid.html +5 -5
  30. package/docs/types/services_coordinates.CoordinateId.html +5 -5
  31. package/docs/types/services_coordinates.CoordinateSearch.html +5 -5
  32. package/docs/types/services_coordinates.CoordinateSearchResult.html +5 -5
  33. package/docs/types/services_coordinates.CoordinateTransformResult.html +5 -5
  34. package/docs/types/services_coordinates.CoordinateTransformation.html +5 -5
  35. package/docs/types/services_coordinates.CoordinatesSearchOptions.html +5 -5
  36. package/docs/types/services_coordinates.CoordinatesTransformOptions.html +5 -5
  37. package/docs/types/services_coordinates.XYZ.html +5 -5
  38. package/docs/types/services_data.GetDataOptions.html +5 -5
  39. package/docs/types/services_geocoding.Coordinates.html +5 -5
  40. package/docs/types/services_geocoding.FeatureHierarchy.html +5 -5
  41. package/docs/types/services_geocoding.GeocodingFeature.html +5 -5
  42. package/docs/types/services_geocoding.GeocodingOptions.html +5 -5
  43. package/docs/types/services_geocoding.GeocodingSearchResult.html +5 -5
  44. package/docs/types/services_geocoding.ReverseGeocodingOptions.html +5 -5
  45. package/docs/types/services_geolocation.GeolocationInfoOptions.html +5 -5
  46. package/docs/types/services_geolocation.GeolocationResult.html +5 -5
  47. package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +5 -5
  48. package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +5 -5
  49. package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +5 -5
  50. package/docs/types/services_staticMaps.StaticMapBaseOptions.html +7 -7
  51. package/docs/types/services_staticMaps.StaticMapMarker.html +5 -5
  52. package/docs/variables/config.config.html +5 -5
  53. package/docs/variables/language.LanguageGeocoding.html +5 -5
  54. package/docs/variables/services_coordinates.coordinates.html +5 -5
  55. package/docs/variables/services_data.data.html +5 -5
  56. package/docs/variables/services_geocoding.geocoding.html +5 -5
  57. package/docs/variables/services_geolocation.geolocation.html +5 -5
  58. package/docs/variables/services_staticMaps.staticMaps.html +5 -5
  59. package/docsmd/README.md +143 -36
  60. package/docsmd/assets/custom.css +28 -1
  61. package/docsmd/classes/ClientConfig.md +5 -5
  62. package/docsmd/classes/MapStyleVariant.md +217 -0
  63. package/docsmd/classes/ReferenceMapStyle.md +169 -0
  64. package/docsmd/classes/ServiceError.md +3 -3
  65. package/examples/test-browser-umd.html +1 -1
  66. package/package.json +1 -1
  67. package/readme.md +64 -5
  68. package/src/index.ts +17 -0
  69. package/src/mapstyle.ts +841 -0
  70. package/src/services/staticMaps.ts +5 -4
  71. package/tsconfig.json +0 -1
  72. package/typedoc.css +28 -1
package/docsmd/README.md CHANGED
@@ -1,12 +1,14 @@
1
- MapTiler Client - v1.0.3
1
+ MapTiler Client - v1.1.0
2
2
 
3
- # MapTiler Client - v1.0.3
3
+ # MapTiler Client - v1.1.0
4
4
 
5
5
  ## Table of contents
6
6
 
7
7
  ### Classes
8
8
 
9
9
  - [ClientConfig](classes/ClientConfig.md)
10
+ - [MapStyleVariant](classes/MapStyleVariant.md)
11
+ - [ReferenceMapStyle](classes/ReferenceMapStyle.md)
10
12
  - [ServiceError](classes/ServiceError.md)
11
13
 
12
14
  ### Type Aliases
@@ -33,6 +35,8 @@ MapTiler Client - v1.0.3
33
35
  - [GeolocationResult](README.md#geolocationresult)
34
36
  - [GetDataOptions](README.md#getdataoptions)
35
37
  - [LanguageGeocodingString](README.md#languagegeocodingstring)
38
+ - [MapStylePreset](README.md#mapstylepreset)
39
+ - [MapStyleType](README.md#mapstyletype)
36
40
  - [ReverseGeocodingOptions](README.md#reversegeocodingoptions)
37
41
  - [StaticMapBaseOptions](README.md#staticmapbaseoptions)
38
42
  - [StaticMapMarker](README.md#staticmapmarker)
@@ -41,13 +45,19 @@ MapTiler Client - v1.0.3
41
45
  ### Variables
42
46
 
43
47
  - [LanguageGeocoding](README.md#languagegeocoding)
48
+ - [MapStyle](README.md#mapstyle)
44
49
  - [config](README.md#config)
45
50
  - [coordinates](README.md#coordinates-1)
46
51
  - [data](README.md#data)
47
52
  - [geocoding](README.md#geocoding)
48
53
  - [geolocation](README.md#geolocation)
54
+ - [mapStylePresetList](README.md#mapstylepresetlist)
49
55
  - [staticMaps](README.md#staticmaps)
50
56
 
57
+ ### Functions
58
+
59
+ - [styleToStyle](README.md#styletostyle)
60
+
51
61
  ## Type Aliases
52
62
 
53
63
  ### AutomaticStaticMapOptions
@@ -58,7 +68,7 @@ Options that can be provided to automatic static maps
58
68
 
59
69
  #### Defined in
60
70
 
61
- [services/staticMaps.ts:140](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L140)
71
+ [services/staticMaps.ts:141](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L141)
62
72
 
63
73
  ___
64
74
 
@@ -70,7 +80,7 @@ Options that can be provided to bounded static maps
70
80
 
71
81
  #### Defined in
72
82
 
73
- [services/staticMaps.ts:129](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L129)
83
+ [services/staticMaps.ts:130](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L130)
74
84
 
75
85
  ___
76
86
 
@@ -82,7 +92,7 @@ Options that can be provided to centered static maps
82
92
 
83
93
  #### Defined in
84
94
 
85
- [services/staticMaps.ts:124](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L124)
95
+ [services/staticMaps.ts:125](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L125)
86
96
 
87
97
  ___
88
98
 
@@ -99,7 +109,7 @@ ___
99
109
 
100
110
  #### Defined in
101
111
 
102
- [services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L38)
112
+ [services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L38)
103
113
 
104
114
  ___
105
115
 
@@ -115,7 +125,7 @@ ___
115
125
 
116
126
  #### Defined in
117
127
 
118
- [services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L43)
128
+ [services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L43)
119
129
 
120
130
  ___
121
131
 
@@ -132,7 +142,7 @@ ___
132
142
 
133
143
  #### Defined in
134
144
 
135
- [services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L33)
145
+ [services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L33)
136
146
 
137
147
  ___
138
148
 
@@ -158,7 +168,7 @@ ___
158
168
 
159
169
  #### Defined in
160
170
 
161
- [services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L61)
171
+ [services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L61)
162
172
 
163
173
  ___
164
174
 
@@ -175,7 +185,7 @@ ___
175
185
 
176
186
  #### Defined in
177
187
 
178
- [services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L91)
188
+ [services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L91)
179
189
 
180
190
  ___
181
191
 
@@ -192,7 +202,7 @@ ___
192
202
 
193
203
  #### Defined in
194
204
 
195
- [services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L159)
205
+ [services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L159)
196
206
 
197
207
  ___
198
208
 
@@ -218,7 +228,7 @@ ___
218
228
 
219
229
  #### Defined in
220
230
 
221
- [services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L47)
231
+ [services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L47)
222
232
 
223
233
  ___
224
234
 
@@ -228,7 +238,7 @@ ___
228
238
 
229
239
  #### Defined in
230
240
 
231
- [services/geocoding.ts:40](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L40)
241
+ [services/geocoding.ts:40](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L40)
232
242
 
233
243
  ___
234
244
 
@@ -247,7 +257,7 @@ ___
247
257
 
248
258
  #### Defined in
249
259
 
250
- [services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L11)
260
+ [services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L11)
251
261
 
252
262
  ___
253
263
 
@@ -268,7 +278,7 @@ Options that can be provided when transforming a coordinate from one CRS to anot
268
278
 
269
279
  #### Defined in
270
280
 
271
- [services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L174)
281
+ [services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L174)
272
282
 
273
283
  ___
274
284
 
@@ -285,7 +295,7 @@ ___
285
295
 
286
296
  #### Defined in
287
297
 
288
- [services/geocoding.ts:42](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L42)
298
+ [services/geocoding.ts:42](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L42)
289
299
 
290
300
  ___
291
301
 
@@ -310,7 +320,7 @@ ___
310
320
 
311
321
  #### Defined in
312
322
 
313
- [config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L1)
323
+ [config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L1)
314
324
 
315
325
  ___
316
326
 
@@ -320,7 +330,7 @@ ___
320
330
 
321
331
  #### Defined in
322
332
 
323
- [services/geocoding.ts:54](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L54)
333
+ [services/geocoding.ts:54](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L54)
324
334
 
325
335
  ___
326
336
 
@@ -339,7 +349,7 @@ ___
339
349
 
340
350
  #### Defined in
341
351
 
342
- [services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L18)
352
+ [services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L18)
343
353
 
344
354
  ___
345
355
 
@@ -358,7 +368,7 @@ ___
358
368
 
359
369
  #### Defined in
360
370
 
361
- [services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L86)
371
+ [services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L86)
362
372
 
363
373
  ___
364
374
 
@@ -376,7 +386,7 @@ Options that can be provided to get user data.
376
386
 
377
387
  #### Defined in
378
388
 
379
- [services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geolocation.ts#L14)
389
+ [services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geolocation.ts#L14)
380
390
 
381
391
  ___
382
392
 
@@ -405,7 +415,7 @@ ___
405
415
 
406
416
  #### Defined in
407
417
 
408
- [services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geolocation.ts#L21)
418
+ [services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geolocation.ts#L21)
409
419
 
410
420
  ___
411
421
 
@@ -423,7 +433,7 @@ Options that can be provided to get user data.
423
433
 
424
434
  #### Defined in
425
435
 
426
- [services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/data.ts#L14)
436
+ [services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/data.ts#L14)
427
437
 
428
438
  ___
429
439
 
@@ -435,7 +445,58 @@ Built-in languages values as strings
435
445
 
436
446
  #### Defined in
437
447
 
438
- [language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/language.ts#L69)
448
+ [language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/language.ts#L69)
449
+
450
+ ___
451
+
452
+ ### MapStylePreset
453
+
454
+ Ƭ **MapStylePreset**: `Object`
455
+
456
+ Type for object containing style details
457
+
458
+ #### Type declaration
459
+
460
+ | Name | Type |
461
+ | :------ | :------ |
462
+ | `description` | `string` |
463
+ | `name` | `string` |
464
+ | `referenceStyleID` | `string` |
465
+ | `variants` | { `description`: `string` ; `id`: `string` ; `imageURL`: `string` ; `name`: `string` ; `variantType`: `string` }[] |
466
+
467
+ #### Defined in
468
+
469
+ [mapstyle.ts:4](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L4)
470
+
471
+ ___
472
+
473
+ ### MapStyleType
474
+
475
+ Ƭ **MapStyleType**: `Object`
476
+
477
+ All the styles and variants maintained by MapTiler.
478
+
479
+ #### Type declaration
480
+
481
+ | Name | Type | Description |
482
+ | :------ | :------ | :------ |
483
+ | `BASIC` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DARK`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LIGHT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | A minimalist street-oriented style without POI |
484
+ | `BRIGHT` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DARK`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LIGHT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `PASTEL`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | A bright street-oriented style, a nice alternative to `streets` |
485
+ | `HYBRID` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | High resolution imagery with labels, political borders and roads. |
486
+ | `OCEAN` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Explore deep see trenches and mountains, with isolines and depth labels |
487
+ | `OPENSTREETMAP` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Classic OpenStreetMap style |
488
+ | `OUTDOOR` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Suitable for outdoor activities. With elevation isolines and hillshading. |
489
+ | `SATELLITE` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | High resolution imagery only, without any label. |
490
+ | `STAGE` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DARK`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LIGHT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Minimalist style, perfect for data visualization |
491
+ | `STREETS` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DARK`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LIGHT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `PASTEL`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Suitable for navigation, with high level of detail on urban areas, plenty of POIs and 3D buildings |
492
+ | `TONER` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `BACKGROUND`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LINES`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LITE`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | A bold very high contrast black and white (no gray!) style for the city |
493
+ | `TOPO` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `PASTEL`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `SHINY`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `TOPOGRAPHIQUE`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | A nice high-contrast, yet less saturated alternative to the `outdoor` style, with hillshading, 3D buildings and fairly high street details |
494
+ | `VOYAGER` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DARK`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `LIGHT`: [`MapStyleVariant`](classes/MapStyleVariant.md) ; `VINTAGE`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | A nice alternative to `streets` with a soft color palette |
495
+ | `WINTER` | [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) & { `DEFAULT`: [`MapStyleVariant`](classes/MapStyleVariant.md) } | Suitabe for winter outdoor activities. With ski tracks, elevation isolines and hillshading. |
496
+
497
+ #### Defined in
498
+
499
+ [mapstyle.ts:225](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L225)
439
500
 
440
501
  ___
441
502
 
@@ -452,7 +513,7 @@ ___
452
513
 
453
514
  #### Defined in
454
515
 
455
- [services/geocoding.ts:165](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L165)
516
+ [services/geocoding.ts:165](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L165)
456
517
 
457
518
  ___
458
519
 
@@ -478,12 +539,12 @@ Base set of options that can be provided to all the types of static maps
478
539
  | `pathFillColor?` | `string` | Color of the filling, also works if the polygon is not closed. The color must be CSS compatible. Examples: - long form hex without transparency `"#FF0000"` (red) - short form hex without transparency `"#F00"` (red) - long form hex with transparency `"#FF000008"` (red, half opacity) - short form hex with transparency `"#F008"` (red, half opacity) - CSS color shorthands: `"red"`, `"chartreuse"`, etc. - decimal RGB values without transparency: `"rgb(128, 100, 255)"` - decimal RGB values with transparency: `"rgb(128, 100, 255, 0.5)"` Default: none (transparent filling) |
479
540
  | `pathStrokeColor?` | `string` | Color of the path line. The color must be CSS compatible. Examples: - long form hex without transparency `"#FF0000"` (red) - short form hex without transparency `"#F00"` (red) - long form hex with transparency `"#FF000008"` (red, half opacity) - short form hex with transparency `"#F008"` (red, half opacity) - CSS color shorthands: `"red"`, `"chartreuse"`, etc. - decimal RGB values without transparency: `"rgb(128, 100, 255)"` - decimal RGB values with transparency: `"rgb(128, 100, 255, 0.5)"` Default: `"blue"` |
480
541
  | `pathWidth?` | `number` | Width of the path line in pixel. It can be floating point precision (ex: `0.5`) Default: `1` if `hiDPI` is `false` and `2` if `hiDPI` is `true`. |
481
- | `style?` | `string` | Style of the map (not full style URL). Example: "winter", "streets-v2". Default: `"streets-v2"` |
542
+ | `style?` | `string` \| [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) \| [`MapStyleVariant`](classes/MapStyleVariant.md) | Style of the map (not full style URL). Example: "winter", "streets-v2". Default: `"streets-v2"` |
482
543
  | `width?` | `number` | Width of the output image. Maximum value: `2048`. Default: `1024` |
483
544
 
484
545
  #### Defined in
485
546
 
486
- [services/staticMaps.ts:9](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L9)
547
+ [services/staticMaps.ts:10](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L10)
487
548
 
488
549
  ___
489
550
 
@@ -495,7 +556,7 @@ Definition of a maker to show on a static map
495
556
 
496
557
  #### Defined in
497
558
 
498
- [services/staticMaps.ts:145](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L145)
559
+ [services/staticMaps.ts:146](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L146)
499
560
 
500
561
  ___
501
562
 
@@ -513,7 +574,7 @@ ___
513
574
 
514
575
  #### Defined in
515
576
 
516
- [services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L153)
577
+ [services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L153)
517
578
 
518
579
  ## Variables
519
580
 
@@ -585,7 +646,23 @@ Languages. Note that not all the languages of this list are available but the co
585
646
 
586
647
  #### Defined in
587
648
 
588
- [language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/language.ts#L4)
649
+ [language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/language.ts#L4)
650
+
651
+ ___
652
+
653
+ ### MapStyle
654
+
655
+ • `Const` **MapStyle**: [`MapStyleType`](README.md#mapstyletype)
656
+
657
+ Contains all the reference map style created by MapTiler team as well as all the variants.
658
+ For example, `MapStyle.STREETS` and the variants:
659
+ - `MapStyle.STREETS.DARK`
660
+ - `MapStyle.STREETS.LIGHT`
661
+ - `MapStyle.STREETS.PASTEL`
662
+
663
+ #### Defined in
664
+
665
+ [mapstyle.ts:841](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L841)
589
666
 
590
667
  ___
591
668
 
@@ -597,7 +674,7 @@ Configuration object
597
674
 
598
675
  #### Defined in
599
676
 
600
- [config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L63)
677
+ [config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L63)
601
678
 
602
679
  ___
603
680
 
@@ -617,7 +694,7 @@ The goal of the **Coordinate API* is query information about spatial coordinate
617
694
 
618
695
  #### Defined in
619
696
 
620
- [services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/coordinates.ts#L253)
697
+ [services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/coordinates.ts#L253)
621
698
 
622
699
  ___
623
700
 
@@ -636,7 +713,7 @@ The **Data API** provides a way to retrieve user data in GeoJSON format.
636
713
 
637
714
  #### Defined in
638
715
 
639
- [services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/data.ts#L59)
716
+ [services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/data.ts#L59)
640
717
 
641
718
  ___
642
719
 
@@ -713,7 +790,7 @@ and to get the location details (country, city, street, etc.) from a geographic
713
790
 
714
791
  #### Defined in
715
792
 
716
- [services/geocoding.ts:233](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geocoding.ts#L233)
793
+ [services/geocoding.ts:233](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geocoding.ts#L233)
717
794
 
718
795
  ___
719
796
 
@@ -732,7 +809,17 @@ The **Geolocation API** provides a way to retrieve the IP address as well as geo
732
809
 
733
810
  #### Defined in
734
811
 
735
- [services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/geolocation.ts#L135)
812
+ [services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/geolocation.ts#L135)
813
+
814
+ ___
815
+
816
+ ### mapStylePresetList
817
+
818
+ • `Const` **mapStylePresetList**: [`MapStylePreset`](README.md#mapstylepreset)[]
819
+
820
+ #### Defined in
821
+
822
+ [mapstyle.ts:433](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L433)
736
823
 
737
824
  ___
738
825
 
@@ -753,4 +840,24 @@ The URL of static maps can then be used within a `<img />` markup element, as th
753
840
 
754
841
  #### Defined in
755
842
 
756
- [services/staticMaps.ts:456](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/services/staticMaps.ts#L456)
843
+ [services/staticMaps.ts:457](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/staticMaps.ts#L457)
844
+
845
+ ## Functions
846
+
847
+ ### styleToStyle
848
+
849
+ ▸ **styleToStyle**(`style`): `string`
850
+
851
+ #### Parameters
852
+
853
+ | Name | Type |
854
+ | :------ | :------ |
855
+ | `style` | `string` \| [`MapStyleVariant`](classes/MapStyleVariant.md) \| [`ReferenceMapStyle`](classes/ReferenceMapStyle.md) |
856
+
857
+ #### Returns
858
+
859
+ `string`
860
+
861
+ #### Defined in
862
+
863
+ [mapstyle.ts:810](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L810)
@@ -1,4 +1,27 @@
1
-
1
+ /* Overiding the default dark mode with color scheme from the light mode */
2
+ @media (prefers-color-scheme: dark) {
3
+ :root {
4
+ --color-background: var(--light-color-background);
5
+ --color-background-secondary: var(--light-color-background-secondary);
6
+ --color-background-warning: var(--light-color-background-warning);
7
+ --color-warning-text: var(--light-color-warning-text);
8
+ --color-icon-background: var(--light-color-icon-background);
9
+ --color-accent: var(--light-color-accent);
10
+ --color-text: var(--light-color-text);
11
+ --color-text-aside: var(--light-color-text-aside);
12
+ --color-link: var(--light-color-link);
13
+ --color-ts: var(--light-color-ts);
14
+ --color-ts-interface: var(--light-color-ts-interface);
15
+ --color-ts-enum: var(--light-color-ts-enum);
16
+ --color-ts-class: var(--light-color-ts-class);
17
+ --color-ts-function: var(--light-color-ts-function);
18
+ --color-ts-namespace: var(--light-color-ts-namespace);
19
+ --color-ts-private: var(--light-color-ts-private);
20
+ --color-ts-variable: var(--light-color-ts-variable);
21
+ --external-icon: var(--light-external-icon);
22
+ --color-scheme: var(--light-color-scheme);
23
+ }
24
+ }
2
25
 
3
26
  body {
4
27
  background: #fff;
@@ -59,6 +82,10 @@ h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
59
82
  display: none;
60
83
  }
61
84
 
85
+ .tsd-navigation a {
86
+ color: #252525;
87
+ }
88
+
62
89
  .tsd-navigation.primary ul li a:hover {
63
90
  border-color: #b3deff;
64
91
  }
@@ -1,4 +1,4 @@
1
- [MapTiler Client - v1.0.3](../README.md) / ClientConfig
1
+ [MapTiler Client - v1.1.0](../README.md) / ClientConfig
2
2
 
3
3
  # Class: ClientConfig
4
4
 
@@ -35,7 +35,7 @@ Get the MapTiler Cloud API key
35
35
 
36
36
  #### Defined in
37
37
 
38
- [config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L41)
38
+ [config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L41)
39
39
 
40
40
  • `set` **apiKey**(`k`): `void`
41
41
 
@@ -53,7 +53,7 @@ Set the MapTiler Cloud API key
53
53
 
54
54
  #### Defined in
55
55
 
56
- [config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L34)
56
+ [config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L34)
57
57
 
58
58
  ___
59
59
 
@@ -69,7 +69,7 @@ Get the fetch fucntion
69
69
 
70
70
  #### Defined in
71
71
 
72
- [config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L55)
72
+ [config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L55)
73
73
 
74
74
  • `set` **fetch**(`f`): `void`
75
75
 
@@ -87,4 +87,4 @@ Set a the custom fetch function to replace the default one
87
87
 
88
88
  #### Defined in
89
89
 
90
- [config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/05ded3a/src/config.ts#L48)
90
+ [config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L48)