@maptiler/client 1.0.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 (107) hide show
  1. package/.eslintrc.cjs +6 -0
  2. package/LICENSE +29 -0
  3. package/dist/maptiler-client.cjs +692 -0
  4. package/dist/maptiler-client.cjs.map +1 -0
  5. package/dist/maptiler-client.d.ts +702 -0
  6. package/dist/maptiler-client.min.mjs +1 -0
  7. package/dist/maptiler-client.mjs +680 -0
  8. package/dist/maptiler-client.mjs.map +1 -0
  9. package/dist/maptiler-client.umd.js +698 -0
  10. package/dist/maptiler-client.umd.js.map +1 -0
  11. package/dist/maptiler-client.umd.min.js +1 -0
  12. package/docs/.nojekyll +1 -0
  13. package/docs/assets/highlight.css +85 -0
  14. package/docs/assets/main.js +54 -0
  15. package/docs/assets/search.js +1 -0
  16. package/docs/assets/style.css +1257 -0
  17. package/docs/classes/ClientConfig.html +122 -0
  18. package/docs/classes/ServiceError.html +93 -0
  19. package/docs/images/JS-logo.svg +4 -0
  20. package/docs/images/TS-logo.svg +6 -0
  21. package/docs/images/maptiler-client-logo.afdesign +0 -0
  22. package/docs/images/maptiler-client-logo.svg +75 -0
  23. package/docs/images/maptiler-logo.svg +23 -0
  24. package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
  25. package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
  26. package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  27. package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  28. package/docs/images/screenshots/static-with-path.png +0 -0
  29. package/docs/index.html +280 -0
  30. package/docs/modules.html +119 -0
  31. package/docs/types/AutomaticStaticMapOptions.html +80 -0
  32. package/docs/types/BoundedStaticMapOptions.html +80 -0
  33. package/docs/types/CenteredStaticMapOptions.html +80 -0
  34. package/docs/types/CoordinateExport.html +85 -0
  35. package/docs/types/CoordinateGrid.html +83 -0
  36. package/docs/types/CoordinateId.html +85 -0
  37. package/docs/types/CoordinateSearch.html +107 -0
  38. package/docs/types/CoordinateSearchResult.html +89 -0
  39. package/docs/types/CoordinateTransformResult.html +90 -0
  40. package/docs/types/CoordinateTransformation.html +103 -0
  41. package/docs/types/Coordinates.html +78 -0
  42. package/docs/types/CoordinatesSearchOptions.html +97 -0
  43. package/docs/types/CoordinatesTransformOptions.html +99 -0
  44. package/docs/types/FeatureHierarchy.html +89 -0
  45. package/docs/types/FetchFunction.html +93 -0
  46. package/docs/types/GeocodingFeature.html +78 -0
  47. package/docs/types/GeocodingOptions.html +97 -0
  48. package/docs/types/GeocodingSearchResult.html +95 -0
  49. package/docs/types/GeolocationInfoOptions.html +87 -0
  50. package/docs/types/GeolocationResult.html +150 -0
  51. package/docs/types/GetDataOptions.html +87 -0
  52. package/docs/types/LanguageGeocodingString.html +80 -0
  53. package/docs/types/ReverseGeocodingOptions.html +89 -0
  54. package/docs/types/StaticMapBaseOptions.html +176 -0
  55. package/docs/types/StaticMapMarker.html +80 -0
  56. package/docs/types/XYZ.html +87 -0
  57. package/docs/variables/LanguageGeocoding.html +193 -0
  58. package/docs/variables/config.html +80 -0
  59. package/docs/variables/coordinates-1.html +124 -0
  60. package/docs/variables/data.html +103 -0
  61. package/docs/variables/geocoding.html +239 -0
  62. package/docs/variables/geolocation.html +101 -0
  63. package/docs/variables/staticMaps.html +147 -0
  64. package/docsmd/.nojekyll +1 -0
  65. package/docsmd/README.md +756 -0
  66. package/docsmd/classes/ClientConfig.md +90 -0
  67. package/docsmd/classes/ServiceError.md +52 -0
  68. package/docsmd/images/JS-logo.svg +4 -0
  69. package/docsmd/images/TS-logo.svg +6 -0
  70. package/docsmd/images/maptiler-client-logo.afdesign +0 -0
  71. package/docsmd/images/maptiler-client-logo.svg +75 -0
  72. package/docsmd/images/maptiler-logo.svg +23 -0
  73. package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
  74. package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
  75. package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  76. package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  77. package/docsmd/images/screenshots/static-with-path.png +0 -0
  78. package/examples/test-browser-es.html +102 -0
  79. package/examples/test-browser-umd.html +89 -0
  80. package/examples/test-node.js +52 -0
  81. package/images/JS-logo.svg +4 -0
  82. package/images/TS-logo.svg +6 -0
  83. package/images/maptiler-client-logo.afdesign +0 -0
  84. package/images/maptiler-client-logo.svg +75 -0
  85. package/images/maptiler-logo.svg +23 -0
  86. package/images/screenshots/static-bounded-europe-1024.png +0 -0
  87. package/images/screenshots/static-bounded-europe-2048.png +0 -0
  88. package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  89. package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  90. package/images/screenshots/static-with-path.png +0 -0
  91. package/package.json +69 -0
  92. package/readme.md +287 -0
  93. package/rollup.config.js +142 -0
  94. package/src/callFetch.ts +18 -0
  95. package/src/config.ts +65 -0
  96. package/src/defaults.ts +11 -0
  97. package/src/index.ts +90 -0
  98. package/src/language.ts +87 -0
  99. package/src/services/ServiceError.ts +10 -0
  100. package/src/services/coordinates.ts +258 -0
  101. package/src/services/data.ts +63 -0
  102. package/src/services/geocoding.ts +239 -0
  103. package/src/services/geolocation.ts +139 -0
  104. package/src/services/simplify.ts +87 -0
  105. package/src/services/staticMaps.ts +462 -0
  106. package/tsconfig.json +10 -0
  107. package/typedoc.json +10 -0
@@ -0,0 +1,756 @@
1
+ MapTiler Client JS
2
+
3
+ # MapTiler Client JS
4
+
5
+ ## Table of contents
6
+
7
+ ### Classes
8
+
9
+ - [ClientConfig](classes/ClientConfig.md)
10
+ - [ServiceError](classes/ServiceError.md)
11
+
12
+ ### Type Aliases
13
+
14
+ - [AutomaticStaticMapOptions](README.md#automaticstaticmapoptions)
15
+ - [BoundedStaticMapOptions](README.md#boundedstaticmapoptions)
16
+ - [CenteredStaticMapOptions](README.md#centeredstaticmapoptions)
17
+ - [CoordinateExport](README.md#coordinateexport)
18
+ - [CoordinateGrid](README.md#coordinategrid)
19
+ - [CoordinateId](README.md#coordinateid)
20
+ - [CoordinateSearch](README.md#coordinatesearch)
21
+ - [CoordinateSearchResult](README.md#coordinatesearchresult)
22
+ - [CoordinateTransformResult](README.md#coordinatetransformresult)
23
+ - [CoordinateTransformation](README.md#coordinatetransformation)
24
+ - [Coordinates](README.md#coordinates)
25
+ - [CoordinatesSearchOptions](README.md#coordinatessearchoptions)
26
+ - [CoordinatesTransformOptions](README.md#coordinatestransformoptions)
27
+ - [FeatureHierarchy](README.md#featurehierarchy)
28
+ - [FetchFunction](README.md#fetchfunction)
29
+ - [GeocodingFeature](README.md#geocodingfeature)
30
+ - [GeocodingOptions](README.md#geocodingoptions)
31
+ - [GeocodingSearchResult](README.md#geocodingsearchresult)
32
+ - [GeolocationInfoOptions](README.md#geolocationinfooptions)
33
+ - [GeolocationResult](README.md#geolocationresult)
34
+ - [GetDataOptions](README.md#getdataoptions)
35
+ - [LanguageGeocodingString](README.md#languagegeocodingstring)
36
+ - [ReverseGeocodingOptions](README.md#reversegeocodingoptions)
37
+ - [StaticMapBaseOptions](README.md#staticmapbaseoptions)
38
+ - [StaticMapMarker](README.md#staticmapmarker)
39
+ - [XYZ](README.md#xyz)
40
+
41
+ ### Variables
42
+
43
+ - [LanguageGeocoding](README.md#languagegeocoding)
44
+ - [config](README.md#config)
45
+ - [coordinates](README.md#coordinates-1)
46
+ - [data](README.md#data)
47
+ - [geocoding](README.md#geocoding)
48
+ - [geolocation](README.md#geolocation)
49
+ - [staticMaps](README.md#staticmaps)
50
+
51
+ ## Type Aliases
52
+
53
+ ### AutomaticStaticMapOptions
54
+
55
+ Ƭ **AutomaticStaticMapOptions**: [`BoundedStaticMapOptions`](README.md#boundedstaticmapoptions)
56
+
57
+ Options that can be provided to automatic static maps
58
+
59
+ #### Defined in
60
+
61
+ [services/staticMaps.ts:140](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L140)
62
+
63
+ ___
64
+
65
+ ### BoundedStaticMapOptions
66
+
67
+ Ƭ **BoundedStaticMapOptions**: [`StaticMapBaseOptions`](README.md#staticmapbaseoptions) & { `padding?`: `number` }
68
+
69
+ Options that can be provided to bounded static maps
70
+
71
+ #### Defined in
72
+
73
+ [services/staticMaps.ts:129](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L129)
74
+
75
+ ___
76
+
77
+ ### CenteredStaticMapOptions
78
+
79
+ Ƭ **CenteredStaticMapOptions**: [`StaticMapBaseOptions`](README.md#staticmapbaseoptions)
80
+
81
+ Options that can be provided to centered static maps
82
+
83
+ #### Defined in
84
+
85
+ [services/staticMaps.ts:124](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L124)
86
+
87
+ ___
88
+
89
+ ### CoordinateExport
90
+
91
+ Ƭ **CoordinateExport**: `Object`
92
+
93
+ #### Type declaration
94
+
95
+ | Name | Type |
96
+ | :------ | :------ |
97
+ | `proj4` | `string` |
98
+ | `wkt` | `string` |
99
+
100
+ #### Defined in
101
+
102
+ [services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L38)
103
+
104
+ ___
105
+
106
+ ### CoordinateGrid
107
+
108
+ Ƭ **CoordinateGrid**: `Object`
109
+
110
+ #### Type declaration
111
+
112
+ | Name | Type |
113
+ | :------ | :------ |
114
+ | `path` | `string` |
115
+
116
+ #### Defined in
117
+
118
+ [services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L43)
119
+
120
+ ___
121
+
122
+ ### CoordinateId
123
+
124
+ Ƭ **CoordinateId**: `Object`
125
+
126
+ #### Type declaration
127
+
128
+ | Name | Type |
129
+ | :------ | :------ |
130
+ | `authority` | `string` |
131
+ | `code` | `BigInteger` |
132
+
133
+ #### Defined in
134
+
135
+ [services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L33)
136
+
137
+ ___
138
+
139
+ ### CoordinateSearch
140
+
141
+ Ƭ **CoordinateSearch**: `Object`
142
+
143
+ #### Type declaration
144
+
145
+ | Name | Type | Description |
146
+ | :------ | :------ | :------ |
147
+ | `accuracy?` | `number` | - |
148
+ | `area?` | `string` | - |
149
+ | `bbox?` | `BBox` | Bounding box of the resource in [min_lon, min_lat, max_lon, max_lat] order. |
150
+ | `default_transformation?` | `any` | Most suitable transformation for this CRS. |
151
+ | `deprecated` | `boolean` | - |
152
+ | `exports` | [`CoordinateExport`](README.md#coordinateexport) | - |
153
+ | `id` | [`CoordinateId`](README.md#coordinateid) | - |
154
+ | `kind` | `string` | - |
155
+ | `name` | `string` | - |
156
+ | `transformations?` | ([`CoordinateTransformation`](README.md#coordinatetransformation) \| `number`)[] | - |
157
+ | `unit?` | `string` | - |
158
+
159
+ #### Defined in
160
+
161
+ [services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L61)
162
+
163
+ ___
164
+
165
+ ### CoordinateSearchResult
166
+
167
+ Ƭ **CoordinateSearchResult**: `Object`
168
+
169
+ #### Type declaration
170
+
171
+ | Name | Type | Description |
172
+ | :------ | :------ | :------ |
173
+ | `results` | [`CoordinateSearch`](README.md#coordinatesearch)[] | The coordinate search results |
174
+ | `total` | `number` | The number of results |
175
+
176
+ #### Defined in
177
+
178
+ [services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L91)
179
+
180
+ ___
181
+
182
+ ### CoordinateTransformResult
183
+
184
+ Ƭ **CoordinateTransformResult**: `Object`
185
+
186
+ #### Type declaration
187
+
188
+ | Name | Type | Description |
189
+ | :------ | :------ | :------ |
190
+ | `results` | [`XYZ`](README.md#xyz)[] | - |
191
+ | `transformer_selection_strategy` | `string` | Transformations are selected using given ops parameter. If no parameter is given, auto strategy is used. If given, it may try to use a listed transformation, then fallback to towgs84 patching, and finally boundcrs. |
192
+
193
+ #### Defined in
194
+
195
+ [services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L159)
196
+
197
+ ___
198
+
199
+ ### CoordinateTransformation
200
+
201
+ Ƭ **CoordinateTransformation**: `Object`
202
+
203
+ #### Type declaration
204
+
205
+ | Name | Type |
206
+ | :------ | :------ |
207
+ | `accuracy?` | `number` |
208
+ | `area?` | `string` |
209
+ | `bbox?` | `BBox` |
210
+ | `deprecated` | `boolean` |
211
+ | `grids` | [`CoordinateGrid`](README.md#coordinategrid)[] |
212
+ | `id` | [`CoordinateId`](README.md#coordinateid) |
213
+ | `name` | `string` |
214
+ | `reversible` | `boolean` |
215
+ | `target_crs?` | [`CoordinateId`](README.md#coordinateid) |
216
+ | `unit?` | `string` |
217
+ | `usable` | `boolean` |
218
+
219
+ #### Defined in
220
+
221
+ [services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L47)
222
+
223
+ ___
224
+
225
+ ### Coordinates
226
+
227
+ Ƭ **Coordinates**: `Position`
228
+
229
+ #### Defined in
230
+
231
+ [services/geocoding.ts:40](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L40)
232
+
233
+ ___
234
+
235
+ ### CoordinatesSearchOptions
236
+
237
+ Ƭ **CoordinatesSearchOptions**: `Object`
238
+
239
+ #### Type declaration
240
+
241
+ | Name | Type | Description |
242
+ | :------ | :------ | :------ |
243
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
244
+ | `exports?` | `boolean` | Show exports in WKT and Proj4 notations (default: false) |
245
+ | `limit?` | `number` | Maximum number of results returned (default: 10) |
246
+ | `transformations?` | `boolean` | Show detailed transformations for each CRS (default: false) |
247
+
248
+ #### Defined in
249
+
250
+ [services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L11)
251
+
252
+ ___
253
+
254
+ ### CoordinatesTransformOptions
255
+
256
+ Ƭ **CoordinatesTransformOptions**: `Object`
257
+
258
+ Options that can be provided when transforming a coordinate from one CRS to another.
259
+
260
+ #### Type declaration
261
+
262
+ | Name | Type | Description |
263
+ | :------ | :------ | :------ |
264
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
265
+ | `operations?` | `number` \| `number`[] | List of codes of operations |
266
+ | `sourceCrs?` | `number` | Source coordinate reference system (default: 4326) |
267
+ | `targetCrs?` | `number` | Target coordinate reference system (default: 4326) |
268
+
269
+ #### Defined in
270
+
271
+ [services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L174)
272
+
273
+ ___
274
+
275
+ ### FeatureHierarchy
276
+
277
+ Ƭ **FeatureHierarchy**: `Object`
278
+
279
+ #### Type declaration
280
+
281
+ | Name | Type | Description |
282
+ | :------ | :------ | :------ |
283
+ | `id` | `string` | Unique feature ID |
284
+ | `text` | `string` | Localized feature name |
285
+
286
+ #### Defined in
287
+
288
+ [services/geocoding.ts:42](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L42)
289
+
290
+ ___
291
+
292
+ ### FetchFunction
293
+
294
+ Ƭ **FetchFunction**: (`url`: `string`, `options`: `object`) => `Promise`<`any`\>
295
+
296
+ #### Type declaration
297
+
298
+ ▸ (`url`, `options`): `Promise`<`any`\>
299
+
300
+ ##### Parameters
301
+
302
+ | Name | Type |
303
+ | :------ | :------ |
304
+ | `url` | `string` |
305
+ | `options` | `object` |
306
+
307
+ ##### Returns
308
+
309
+ `Promise`<`any`\>
310
+
311
+ #### Defined in
312
+
313
+ [config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/config.ts#L1)
314
+
315
+ ___
316
+
317
+ ### GeocodingFeature
318
+
319
+ Ƭ **GeocodingFeature**: `Feature` & { `address?`: `string` ; `bbox`: `BBox` ; `center`: [`Coordinates`](README.md#coordinates) ; `context?`: [`FeatureHierarchy`](README.md#featurehierarchy)[] ; `place_name`: `string` ; `text`: `string` }
320
+
321
+ #### Defined in
322
+
323
+ [services/geocoding.ts:54](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L54)
324
+
325
+ ___
326
+
327
+ ### GeocodingOptions
328
+
329
+ Ƭ **GeocodingOptions**: `Object`
330
+
331
+ #### Type declaration
332
+
333
+ | Name | Type | Description |
334
+ | :------ | :------ | :------ |
335
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
336
+ | `bbox?` | `BBox` | Only search for results in the specified area. |
337
+ | `language?` | [`LanguageGeocodingString`](README.md#languagegeocodingstring) \| [`LanguageGeocodingString`](README.md#languagegeocodingstring)[] | Prefer results in specific language. It’s possible to specify multiple values. |
338
+ | `proximity?` | `Position` | Prefer results close to a specific location. |
339
+
340
+ #### Defined in
341
+
342
+ [services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L18)
343
+
344
+ ___
345
+
346
+ ### GeocodingSearchResult
347
+
348
+ Ƭ **GeocodingSearchResult**: `Object`
349
+
350
+ #### Type declaration
351
+
352
+ | Name | Type | Description |
353
+ | :------ | :------ | :------ |
354
+ | `attribution` | `string` | Attribution of the result |
355
+ | `features` | [`GeocodingFeature`](README.md#geocodingfeature)[] | Array of features found |
356
+ | `query` | `string`[] | Tokenized search query |
357
+ | `type` | ``"FeatureCollection"`` | - |
358
+
359
+ #### Defined in
360
+
361
+ [services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L86)
362
+
363
+ ___
364
+
365
+ ### GeolocationInfoOptions
366
+
367
+ Ƭ **GeolocationInfoOptions**: `Object`
368
+
369
+ Options that can be provided to get user data.
370
+
371
+ #### Type declaration
372
+
373
+ | Name | Type | Description |
374
+ | :------ | :------ | :------ |
375
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
376
+
377
+ #### Defined in
378
+
379
+ [services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geolocation.ts#L14)
380
+
381
+ ___
382
+
383
+ ### GeolocationResult
384
+
385
+ Ƭ **GeolocationResult**: `Object`
386
+
387
+ #### Type declaration
388
+
389
+ | Name | Type | Description |
390
+ | :------ | :------ | :------ |
391
+ | `city?` | `string` | Name of the city Example: Zurich |
392
+ | `continent?` | `string` | Name of the continent Example: Europe |
393
+ | `continent_code?` | `string` | Two-letter code of the continent Example: EU |
394
+ | `country?` | `string` | Name of the country Example: Switzerland |
395
+ | `country_bounds?` | `BBox` | Bounds of the country in WGS84 degrees [west, south, east, north]. Example: [5.95538,45.818852,10.490936,47.809357] |
396
+ | `country_code?` | `string` | Two-letter code of the country ISO 3166-1 alpha-2 codes Example: CH |
397
+ | `country_languages?` | `string`[] | Official country languages in ISO 639-1 format. ISO 639-1 codes Example: ["de","fr","it"] |
398
+ | `eu?` | `boolean` | Indicated whether the country is part of the European Union. |
399
+ | `latitude?` | `number` | Latitude of the location Example: 47.36667 |
400
+ | `longitude?` | `number` | Longitude of the location Example: 8.55 |
401
+ | `postal?` | `string` | Postal code Example: 8000 |
402
+ | `region?` | `string` | If known, the ISO 3166-2 name for the first level region. ISO 3166-2 codes Example: Zurich |
403
+ | `region_code?` | `string` | If known, the ISO 3166-2 code for the first level region. ISO 3166-2 codes Example: ZH |
404
+ | `timezone?` | `string` | Name of the timezone Example: Europe/Zurich |
405
+
406
+ #### Defined in
407
+
408
+ [services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geolocation.ts#L21)
409
+
410
+ ___
411
+
412
+ ### GetDataOptions
413
+
414
+ Ƭ **GetDataOptions**: `Object`
415
+
416
+ Options that can be provided to get user data.
417
+
418
+ #### Type declaration
419
+
420
+ | Name | Type | Description |
421
+ | :------ | :------ | :------ |
422
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
423
+
424
+ #### Defined in
425
+
426
+ [services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/data.ts#L14)
427
+
428
+ ___
429
+
430
+ ### LanguageGeocodingString
431
+
432
+ Ƭ **LanguageGeocodingString**: `Values`<typeof [`LanguageGeocoding`](README.md#languagegeocoding)\>
433
+
434
+ Built-in languages values as strings
435
+
436
+ #### Defined in
437
+
438
+ [language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/language.ts#L69)
439
+
440
+ ___
441
+
442
+ ### ReverseGeocodingOptions
443
+
444
+ Ƭ **ReverseGeocodingOptions**: `Object`
445
+
446
+ #### Type declaration
447
+
448
+ | Name | Type | Description |
449
+ | :------ | :------ | :------ |
450
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
451
+ | `language?` | [`LanguageGeocodingString`](README.md#languagegeocodingstring) \| [`LanguageGeocodingString`](README.md#languagegeocodingstring)[] | Prefer results in specific language. It’s possible to specify multiple values. |
452
+
453
+ #### Defined in
454
+
455
+ [services/geocoding.ts:165](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L165)
456
+
457
+ ___
458
+
459
+ ### StaticMapBaseOptions
460
+
461
+ Ƭ **StaticMapBaseOptions**: `Object`
462
+
463
+ Base set of options that can be provided to all the types of static maps
464
+
465
+ #### Type declaration
466
+
467
+ | Name | Type | Description |
468
+ | :------ | :------ | :------ |
469
+ | `apiKey?` | `string` | Custom mapTiler Cloud API key to use instead of the one in global `config` |
470
+ | `attribution?` | ``"bottomright"`` \| ``"bottomleft"`` \| ``"topleft"`` \| ``"topright"`` \| ``false`` | Placement of the attribution. Can also be set to `false` to not show attribution. Default: `"bottomright"` |
471
+ | `format?` | ``"png"`` \| ``"jpg"`` \| ``"webp"`` | Image format. Default: `"png"` |
472
+ | `height?` | `number` | Height of the output image. Maximum value: `2048`. Default: `1024` |
473
+ | `hiDPI?` | `boolean` | Double the size of the static map image to support hiDPI/Retina monitors. Default: `false` |
474
+ | `markerAnchor?` | ``"top"`` \| ``"left"`` \| ``"bottom"`` \| ``"right"`` \| ``"center"`` \| ``"topleft"`` \| ``"bottomleft"`` \| ``"topright"`` \| ``"bottomright"`` | Position of the marker regarding its coordinates. Applies only: - with a custom icon provided with `markerIcon` - if one or multiple markers positions are provided. Default: `"bottom"` |
475
+ | `markerIcon?` | `string` | URL of the marker image. Applies only if one or multiple markers positions are provided. Default: none provided |
476
+ | `markers?` | [`StaticMapMarker`](README.md#staticmapmarker) \| [`StaticMapMarker`](README.md#staticmapmarker)[] | A marker or list of markers to show on the map Default: none provided |
477
+ | `path?` | `Position`[] | Draw a path or polygon on top of the map. If the path is too long it will be simplified, yet remaining accurate. Default: none provided |
478
+ | `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
+ | `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
+ | `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"` |
482
+ | `width?` | `number` | Width of the output image. Maximum value: `2048`. Default: `1024` |
483
+
484
+ #### Defined in
485
+
486
+ [services/staticMaps.ts:9](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L9)
487
+
488
+ ___
489
+
490
+ ### StaticMapMarker
491
+
492
+ Ƭ **StaticMapMarker**: [`number`, `number`, `string`]
493
+
494
+ Definition of a maker to show on a static map
495
+
496
+ #### Defined in
497
+
498
+ [services/staticMaps.ts:145](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L145)
499
+
500
+ ___
501
+
502
+ ### XYZ
503
+
504
+ Ƭ **XYZ**: `Object`
505
+
506
+ #### Type declaration
507
+
508
+ | Name | Type |
509
+ | :------ | :------ |
510
+ | `x?` | `number` |
511
+ | `y?` | `number` |
512
+ | `z?` | `number` |
513
+
514
+ #### Defined in
515
+
516
+ [services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L153)
517
+
518
+ ## Variables
519
+
520
+ ### LanguageGeocoding
521
+
522
+ • `Const` **LanguageGeocoding**: `Object`
523
+
524
+ Languages. Note that not all the languages of this list are available but the compatibility list may be expanded in the future.
525
+
526
+ #### Type declaration
527
+
528
+ | Name | Type |
529
+ | :------ | :------ |
530
+ | `ALBANIAN` | `string` |
531
+ | `ARABIC` | `string` |
532
+ | `ARMENIAN` | `string` |
533
+ | `AUTO` | `string` |
534
+ | `AZERBAIJANI` | `string` |
535
+ | `BELORUSSIAN` | `string` |
536
+ | `BOSNIAN` | `string` |
537
+ | `BRETON` | `string` |
538
+ | `BULGARIAN` | `string` |
539
+ | `CATALAN` | `string` |
540
+ | `CHINESE` | `string` |
541
+ | `CROATIAN` | `string` |
542
+ | `CZECH` | `string` |
543
+ | `DANISH` | `string` |
544
+ | `DUTCH` | `string` |
545
+ | `ENGLISH` | `string` |
546
+ | `ESPERANTO` | `string` |
547
+ | `ESTONIAN` | `string` |
548
+ | `FINNISH` | `string` |
549
+ | `FRENCH` | `string` |
550
+ | `FRISIAN` | `string` |
551
+ | `GEORGIAN` | `string` |
552
+ | `GERMAN` | `string` |
553
+ | `GREEK` | `string` |
554
+ | `HEBREW` | `string` |
555
+ | `HUNGARIAN` | `string` |
556
+ | `ICELANDIC` | `string` |
557
+ | `IRISH` | `string` |
558
+ | `ITALIAN` | `string` |
559
+ | `JAPANESE` | `string` |
560
+ | `KANNADA` | `string` |
561
+ | `KAZAKH` | `string` |
562
+ | `KOREAN` | `string` |
563
+ | `LATVIAN` | `string` |
564
+ | `LITHUANIAN` | `string` |
565
+ | `LUXEMBOURGISH` | `string` |
566
+ | `MACEDONIAN` | `string` |
567
+ | `MALTESE` | `string` |
568
+ | `NORWEGIAN` | `string` |
569
+ | `POLISH` | `string` |
570
+ | `PORTUGUESE` | `string` |
571
+ | `ROMANIAN` | `string` |
572
+ | `ROMANSH` | `string` |
573
+ | `ROMAN_LATIN` | `string` |
574
+ | `RUSSIAN` | `string` |
575
+ | `SCOTTISH_GAELIC` | `string` |
576
+ | `SERBIAN_CYRILLIC` | `string` |
577
+ | `SLOVAK` | `string` |
578
+ | `SLOVENE` | `string` |
579
+ | `SPANISH` | `string` |
580
+ | `SWEDISH` | `string` |
581
+ | `THAI` | `string` |
582
+ | `TURKISH` | `string` |
583
+ | `UKRAINIAN` | `string` |
584
+ | `WELSH` | `string` |
585
+
586
+ #### Defined in
587
+
588
+ [language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/language.ts#L4)
589
+
590
+ ___
591
+
592
+ ### config
593
+
594
+ • `Const` **config**: [`ClientConfig`](classes/ClientConfig.md)
595
+
596
+ Configuration object
597
+
598
+ #### Defined in
599
+
600
+ [config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/config.ts#L63)
601
+
602
+ ___
603
+
604
+ ### coordinates
605
+
606
+ • `Const` **coordinates**: `Object`
607
+
608
+ The **coordinate** namespace contains asynchronous functions to call the [MapTiler Coordinate API](https://docs.maptiler.com/cloud/api/coordinates/).
609
+ The goal of the **Coordinate API* is query information about spatial coordinate reference system (CRS) as well as to transform coordinates from one CRS to another.
610
+
611
+ #### Type declaration
612
+
613
+ | Name | Type |
614
+ | :------ | :------ |
615
+ | `search` | (`query`: `string`, `options`: [`CoordinatesSearchOptions`](README.md#coordinatessearchoptions)) => `Promise`<[`CoordinateSearchResult`](README.md#coordinatesearchresult)\> |
616
+ | `transform` | (`positions`: `Position` \| `Position`[], `options`: [`CoordinatesTransformOptions`](README.md#coordinatestransformoptions)) => `Promise`<[`CoordinateTransformResult`](README.md#coordinatetransformresult)\> |
617
+
618
+ #### Defined in
619
+
620
+ [services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/coordinates.ts#L253)
621
+
622
+ ___
623
+
624
+ ### data
625
+
626
+ • `Const` **data**: `Object`
627
+
628
+ The **data** namespace contains an asynchronous function to call the [MapTiler Data API](https://docs.maptiler.com/cloud/api/data/).
629
+ The **Data API** provides a way to retrieve user data in GeoJSON format.
630
+
631
+ #### Type declaration
632
+
633
+ | Name | Type |
634
+ | :------ | :------ |
635
+ | `get` | (`dataId`: `string`, `options`: [`GetDataOptions`](README.md#getdataoptions)) => `Promise`<`FeatureCollection`\> |
636
+
637
+ #### Defined in
638
+
639
+ [services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/data.ts#L59)
640
+
641
+ ___
642
+
643
+ ### geocoding
644
+
645
+ • `Const` **geocoding**: `Object`
646
+
647
+ The **geocoding** namespace contains asynchronous functions to call the [MapTiler Geocoding API](https://docs.maptiler.com/cloud/api/geocoding/).
648
+ The **Geocoding API** provides ways to get geographic coordinates from a human-readable search query of a place (forward geocoding)
649
+ and to get the location details (country, city, street, etc.) from a geographic coordinate (reverse geocoding);
650
+
651
+ #### Type declaration
652
+
653
+ | Name | Type |
654
+ | :------ | :------ |
655
+ | `forward` | (`query`: `string`, `options`: [`GeocodingOptions`](README.md#geocodingoptions)) => `Promise`<[`GeocodingSearchResult`](README.md#geocodingsearchresult)\> |
656
+ | `language` | { `ALBANIAN`: `string` = "sq"; `ARABIC`: `string` = "ar"; `ARMENIAN`: `string` = "hy"; `AUTO`: `string` = "auto"; `AZERBAIJANI`: `string` = "az"; `BELORUSSIAN`: `string` = "be"; `BOSNIAN`: `string` = "bs"; `BRETON`: `string` = "br"; `BULGARIAN`: `string` = "bg"; `CATALAN`: `string` = "ca"; `CHINESE`: `string` = "zh"; `CROATIAN`: `string` = "hr"; `CZECH`: `string` = "cs"; `DANISH`: `string` = "da"; `DUTCH`: `string` = "nl"; `ENGLISH`: `string` = "en"; `ESPERANTO`: `string` = "eo"; `ESTONIAN`: `string` = "et"; `FINNISH`: `string` = "fi"; `FRENCH`: `string` = "fr"; `FRISIAN`: `string` = "fy"; `GEORGIAN`: `string` = "ka"; `GERMAN`: `string` = "de"; `GREEK`: `string` = "el"; `HEBREW`: `string` = "he"; `HUNGARIAN`: `string` = "hu"; `ICELANDIC`: `string` = "is"; `IRISH`: `string` = "ga"; `ITALIAN`: `string` = "it"; `JAPANESE`: `string` = "ja"; `KANNADA`: `string` = "kn"; `KAZAKH`: `string` = "kk"; `KOREAN`: `string` = "ko"; `LATVIAN`: `string` = "lv"; `LITHUANIAN`: `string` = "lt"; `LUXEMBOURGISH`: `string` = "lb"; `MACEDONIAN`: `string` = "mk"; `MALTESE`: `string` = "mt"; `NORWEGIAN`: `string` = "no"; `POLISH`: `string` = "pl"; `PORTUGUESE`: `string` = "pt"; `ROMANIAN`: `string` = "ro"; `ROMANSH`: `string` = "rm"; `ROMAN_LATIN`: `string` = "la"; `RUSSIAN`: `string` = "ru"; `SCOTTISH_GAELIC`: `string` = "gd"; `SERBIAN_CYRILLIC`: `string` = "sr"; `SLOVAK`: `string` = "sk"; `SLOVENE`: `string` = "sl"; `SPANISH`: `string` = "es"; `SWEDISH`: `string` = "sv"; `THAI`: `string` = "th"; `TURKISH`: `string` = "tr"; `UKRAINIAN`: `string` = "uk"; `WELSH`: `string` = "cy" } |
657
+ | `language.ALBANIAN` | `string` |
658
+ | `language.ARABIC` | `string` |
659
+ | `language.ARMENIAN` | `string` |
660
+ | `language.AUTO` | `string` |
661
+ | `language.AZERBAIJANI` | `string` |
662
+ | `language.BELORUSSIAN` | `string` |
663
+ | `language.BOSNIAN` | `string` |
664
+ | `language.BRETON` | `string` |
665
+ | `language.BULGARIAN` | `string` |
666
+ | `language.CATALAN` | `string` |
667
+ | `language.CHINESE` | `string` |
668
+ | `language.CROATIAN` | `string` |
669
+ | `language.CZECH` | `string` |
670
+ | `language.DANISH` | `string` |
671
+ | `language.DUTCH` | `string` |
672
+ | `language.ENGLISH` | `string` |
673
+ | `language.ESPERANTO` | `string` |
674
+ | `language.ESTONIAN` | `string` |
675
+ | `language.FINNISH` | `string` |
676
+ | `language.FRENCH` | `string` |
677
+ | `language.FRISIAN` | `string` |
678
+ | `language.GEORGIAN` | `string` |
679
+ | `language.GERMAN` | `string` |
680
+ | `language.GREEK` | `string` |
681
+ | `language.HEBREW` | `string` |
682
+ | `language.HUNGARIAN` | `string` |
683
+ | `language.ICELANDIC` | `string` |
684
+ | `language.IRISH` | `string` |
685
+ | `language.ITALIAN` | `string` |
686
+ | `language.JAPANESE` | `string` |
687
+ | `language.KANNADA` | `string` |
688
+ | `language.KAZAKH` | `string` |
689
+ | `language.KOREAN` | `string` |
690
+ | `language.LATVIAN` | `string` |
691
+ | `language.LITHUANIAN` | `string` |
692
+ | `language.LUXEMBOURGISH` | `string` |
693
+ | `language.MACEDONIAN` | `string` |
694
+ | `language.MALTESE` | `string` |
695
+ | `language.NORWEGIAN` | `string` |
696
+ | `language.POLISH` | `string` |
697
+ | `language.PORTUGUESE` | `string` |
698
+ | `language.ROMANIAN` | `string` |
699
+ | `language.ROMANSH` | `string` |
700
+ | `language.ROMAN_LATIN` | `string` |
701
+ | `language.RUSSIAN` | `string` |
702
+ | `language.SCOTTISH_GAELIC` | `string` |
703
+ | `language.SERBIAN_CYRILLIC` | `string` |
704
+ | `language.SLOVAK` | `string` |
705
+ | `language.SLOVENE` | `string` |
706
+ | `language.SPANISH` | `string` |
707
+ | `language.SWEDISH` | `string` |
708
+ | `language.THAI` | `string` |
709
+ | `language.TURKISH` | `string` |
710
+ | `language.UKRAINIAN` | `string` |
711
+ | `language.WELSH` | `string` |
712
+ | `reverse` | (`position`: `Position`, `options`: [`ReverseGeocodingOptions`](README.md#reversegeocodingoptions)) => `Promise`<[`GeocodingSearchResult`](README.md#geocodingsearchresult)\> |
713
+
714
+ #### Defined in
715
+
716
+ [services/geocoding.ts:233](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geocoding.ts#L233)
717
+
718
+ ___
719
+
720
+ ### geolocation
721
+
722
+ • `Const` **geolocation**: `Object`
723
+
724
+ The **geolocation** namespace contains an asynchronous function to call the [MapTiler Geolocation API](https://docs.maptiler.com/cloud/api/geolocation/).
725
+ The **Geolocation API** provides a way to retrieve the IP address as well as geographic informations of a machine performing the query (most likely: a user)
726
+
727
+ #### Type declaration
728
+
729
+ | Name | Type |
730
+ | :------ | :------ |
731
+ | `info` | (`options`: [`GeolocationInfoOptions`](README.md#geolocationinfooptions)) => `Promise`<[`GeolocationResult`](README.md#geolocationresult)\> |
732
+
733
+ #### Defined in
734
+
735
+ [services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/geolocation.ts#L135)
736
+
737
+ ___
738
+
739
+ ### staticMaps
740
+
741
+ • `Const` **staticMaps**: `Object`
742
+
743
+ The **staticMaps** namespace contains an synchronous function build image URL of static map, as specified by the [MapTiler Static Map API](https://docs.maptiler.com/cloud/api/static-maps/).
744
+ The URL of static maps can then be used within a `<img />` markup element, as the `src` property value.
745
+
746
+ #### Type declaration
747
+
748
+ | Name | Type |
749
+ | :------ | :------ |
750
+ | `automatic` | (`options`: [`BoundedStaticMapOptions`](README.md#boundedstaticmapoptions)) => `string` |
751
+ | `bounded` | (`boundingBox`: `BBox`, `options`: [`BoundedStaticMapOptions`](README.md#boundedstaticmapoptions)) => `string` |
752
+ | `centered` | (`center`: `Position`, `zoom`: `number`, `options`: [`StaticMapBaseOptions`](README.md#staticmapbaseoptions)) => `string` |
753
+
754
+ #### Defined in
755
+
756
+ [services/staticMaps.ts:456](https://github.com/maptiler/maptiler-client-js/blob/3a42869/src/services/staticMaps.ts#L456)