@maptiler/client 1.5.0 → 1.6.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.
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +64 -9
- package/dist/maptiler-client.mjs.map +1 -1
- package/dist/maptiler-client.umd.js.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/config.ClientConfig.html +9 -9
- package/docs/classes/services_ServiceError.ServiceError.html +7 -7
- package/docs/functions/language.getAutoLanguageGeocoding.html +5 -5
- package/docs/functions/services_simplify.default.html +5 -5
- package/docs/index.html +4 -4
- package/docs/modules/config.html +5 -5
- package/docs/modules/language.html +5 -5
- package/docs/modules/services_ServiceError.html +5 -5
- package/docs/modules/services_coordinates.html +5 -5
- package/docs/modules/services_data.html +5 -5
- package/docs/modules/services_geocoding.html +5 -5
- package/docs/modules/services_geolocation.html +5 -5
- package/docs/modules/services_simplify.html +5 -5
- package/docs/modules/services_staticMaps.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/config.FetchFunction.html +5 -5
- package/docs/types/language.LanguageGeocodingString.html +5 -5
- package/docs/types/services_coordinates.CoordinateExport.html +5 -5
- package/docs/types/services_coordinates.CoordinateGrid.html +5 -5
- package/docs/types/services_coordinates.CoordinateId.html +5 -5
- package/docs/types/services_coordinates.CoordinateSearch.html +5 -5
- package/docs/types/services_coordinates.CoordinateSearchResult.html +5 -5
- package/docs/types/services_coordinates.CoordinateTransformResult.html +5 -5
- package/docs/types/services_coordinates.CoordinateTransformation.html +5 -5
- package/docs/types/services_coordinates.CoordinatesSearchOptions.html +5 -5
- package/docs/types/services_coordinates.CoordinatesTransformOptions.html +5 -5
- package/docs/types/services_coordinates.XYZ.html +5 -5
- package/docs/types/services_data.GetDataOptions.html +5 -5
- package/docs/types/services_geocoding.ByIdGeocodingOptions.html +5 -5
- package/docs/types/services_geocoding.CommonForwardAndReverseGeocodingOptions.html +6 -6
- package/docs/types/services_geocoding.Coordinates.html +5 -5
- package/docs/types/services_geocoding.FeatureHierarchy.html +6 -17
- package/docs/types/services_geocoding.GeocodingFeature.html +6 -6
- package/docs/types/services_geocoding.GeocodingOptions.html +5 -5
- package/docs/types/services_geocoding.GeocodingSearchResult.html +5 -5
- package/docs/types/services_geocoding.LanguageGeocodingOptions.html +5 -5
- package/docs/types/services_geocoding.ReverseGeocodingOptions.html +5 -5
- package/docs/types/services_geolocation.GeolocationInfoOptions.html +5 -5
- package/docs/types/services_geolocation.GeolocationResult.html +5 -5
- package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +5 -5
- package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +5 -5
- package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +5 -5
- package/docs/types/services_staticMaps.StaticMapBaseOptions.html +5 -5
- package/docs/types/services_staticMaps.StaticMapMarker.html +5 -5
- package/docs/variables/config.config.html +5 -5
- package/docs/variables/language.LanguageGeocoding.html +5 -5
- package/docs/variables/services_coordinates.coordinates.html +5 -5
- package/docs/variables/services_data.data.html +5 -5
- package/docs/variables/services_geocoding.geocoding.html +5 -5
- package/docs/variables/services_geolocation.geolocation.html +5 -5
- package/docs/variables/services_staticMaps.staticMaps.html +5 -5
- package/docsmd/README.md +45 -52
- package/docsmd/classes/ClientConfig.md +5 -5
- package/docsmd/classes/MapStyleVariant.md +13 -13
- package/docsmd/classes/ReferenceMapStyle.md +9 -9
- package/docsmd/classes/ServiceError.md +3 -3
- package/examples/test-node.js +9 -9
- package/package.json +1 -1
- package/src/services/geocoding.ts +96 -18
package/docsmd/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
MapTiler Client - v1.
|
|
1
|
+
MapTiler Client - v1.6.0
|
|
2
2
|
|
|
3
|
-
# MapTiler Client - v1.
|
|
3
|
+
# MapTiler Client - v1.6.0
|
|
4
4
|
|
|
5
5
|
## Table of contents
|
|
6
6
|
|
|
@@ -70,7 +70,7 @@ Options that can be provided to automatic static maps
|
|
|
70
70
|
|
|
71
71
|
#### Defined in
|
|
72
72
|
|
|
73
|
-
[services/staticMaps.ts:141](https://github.com/maptiler/maptiler-client-js/blob/
|
|
73
|
+
[services/staticMaps.ts:141](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L141)
|
|
74
74
|
|
|
75
75
|
___
|
|
76
76
|
|
|
@@ -82,7 +82,7 @@ Options that can be provided to bounded static maps
|
|
|
82
82
|
|
|
83
83
|
#### Defined in
|
|
84
84
|
|
|
85
|
-
[services/staticMaps.ts:130](https://github.com/maptiler/maptiler-client-js/blob/
|
|
85
|
+
[services/staticMaps.ts:130](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L130)
|
|
86
86
|
|
|
87
87
|
___
|
|
88
88
|
|
|
@@ -94,17 +94,17 @@ Options that can be provided to centered static maps
|
|
|
94
94
|
|
|
95
95
|
#### Defined in
|
|
96
96
|
|
|
97
|
-
[services/staticMaps.ts:125](https://github.com/maptiler/maptiler-client-js/blob/
|
|
97
|
+
[services/staticMaps.ts:125](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L125)
|
|
98
98
|
|
|
99
99
|
___
|
|
100
100
|
|
|
101
101
|
### CommonForwardAndReverseGeocodingOptions
|
|
102
102
|
|
|
103
|
-
Ƭ **CommonForwardAndReverseGeocodingOptions**: [`LanguageGeocodingOptions`](README.md#languagegeocodingoptions) & { `apiKey?`: `string` ; `limit?`: `number` ; `types?`: (``"country"`` \| ``"region"`` \| ``"subregion"`` \| ``"county"`` \| ``"joint_municipality"`` \| ``"joint_submunicipality"`` \| ``"municipality"`` \| ``"municipal_district"`` \| ``"locality"`` \| ``"neighbourhood"`` \| ``"place"`` \| ``"postal_code"`` \| ``"address"``)[] }
|
|
103
|
+
Ƭ **CommonForwardAndReverseGeocodingOptions**: [`LanguageGeocodingOptions`](README.md#languagegeocodingoptions) & { `apiKey?`: `string` ; `limit?`: `number` ; `types?`: (``"country"`` \| ``"region"`` \| ``"subregion"`` \| ``"county"`` \| ``"joint_municipality"`` \| ``"joint_submunicipality"`` \| ``"municipality"`` \| ``"municipal_district"`` \| ``"locality"`` \| ``"neighbourhood"`` \| ``"place"`` \| ``"postal_code"`` \| ``"address"`` \| ``"poi"``)[] }
|
|
104
104
|
|
|
105
105
|
#### Defined in
|
|
106
106
|
|
|
107
|
-
[services/geocoding.ts:25](https://github.com/maptiler/maptiler-client-js/blob/
|
|
107
|
+
[services/geocoding.ts:25](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L25)
|
|
108
108
|
|
|
109
109
|
___
|
|
110
110
|
|
|
@@ -121,7 +121,7 @@ ___
|
|
|
121
121
|
|
|
122
122
|
#### Defined in
|
|
123
123
|
|
|
124
|
-
[services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/
|
|
124
|
+
[services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L38)
|
|
125
125
|
|
|
126
126
|
___
|
|
127
127
|
|
|
@@ -137,7 +137,7 @@ ___
|
|
|
137
137
|
|
|
138
138
|
#### Defined in
|
|
139
139
|
|
|
140
|
-
[services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/
|
|
140
|
+
[services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L43)
|
|
141
141
|
|
|
142
142
|
___
|
|
143
143
|
|
|
@@ -154,7 +154,7 @@ ___
|
|
|
154
154
|
|
|
155
155
|
#### Defined in
|
|
156
156
|
|
|
157
|
-
[services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/
|
|
157
|
+
[services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L33)
|
|
158
158
|
|
|
159
159
|
___
|
|
160
160
|
|
|
@@ -180,7 +180,7 @@ ___
|
|
|
180
180
|
|
|
181
181
|
#### Defined in
|
|
182
182
|
|
|
183
|
-
[services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/
|
|
183
|
+
[services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L61)
|
|
184
184
|
|
|
185
185
|
___
|
|
186
186
|
|
|
@@ -197,7 +197,7 @@ ___
|
|
|
197
197
|
|
|
198
198
|
#### Defined in
|
|
199
199
|
|
|
200
|
-
[services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/
|
|
200
|
+
[services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L91)
|
|
201
201
|
|
|
202
202
|
___
|
|
203
203
|
|
|
@@ -214,7 +214,7 @@ ___
|
|
|
214
214
|
|
|
215
215
|
#### Defined in
|
|
216
216
|
|
|
217
|
-
[services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/
|
|
217
|
+
[services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L159)
|
|
218
218
|
|
|
219
219
|
___
|
|
220
220
|
|
|
@@ -240,7 +240,7 @@ ___
|
|
|
240
240
|
|
|
241
241
|
#### Defined in
|
|
242
242
|
|
|
243
|
-
[services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/
|
|
243
|
+
[services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L47)
|
|
244
244
|
|
|
245
245
|
___
|
|
246
246
|
|
|
@@ -250,7 +250,7 @@ ___
|
|
|
250
250
|
|
|
251
251
|
#### Defined in
|
|
252
252
|
|
|
253
|
-
[services/geocoding.ts:
|
|
253
|
+
[services/geocoding.ts:90](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L90)
|
|
254
254
|
|
|
255
255
|
___
|
|
256
256
|
|
|
@@ -269,7 +269,7 @@ ___
|
|
|
269
269
|
|
|
270
270
|
#### Defined in
|
|
271
271
|
|
|
272
|
-
[services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/
|
|
272
|
+
[services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L11)
|
|
273
273
|
|
|
274
274
|
___
|
|
275
275
|
|
|
@@ -290,24 +290,17 @@ Options that can be provided when transforming a coordinate from one CRS to anot
|
|
|
290
290
|
|
|
291
291
|
#### Defined in
|
|
292
292
|
|
|
293
|
-
[services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/
|
|
293
|
+
[services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L174)
|
|
294
294
|
|
|
295
295
|
___
|
|
296
296
|
|
|
297
297
|
### FeatureHierarchy
|
|
298
298
|
|
|
299
|
-
Ƭ **FeatureHierarchy**: `
|
|
300
|
-
|
|
301
|
-
#### Type declaration
|
|
302
|
-
|
|
303
|
-
| Name | Type | Description |
|
|
304
|
-
| :------ | :------ | :------ |
|
|
305
|
-
| `id` | `string` | Unique feature ID |
|
|
306
|
-
| `text` | `string` | Localized feature name |
|
|
299
|
+
Ƭ **FeatureHierarchy**: `FeatureProperties` & `FeatureBase`
|
|
307
300
|
|
|
308
301
|
#### Defined in
|
|
309
302
|
|
|
310
|
-
[services/geocoding.ts:
|
|
303
|
+
[services/geocoding.ts:159](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L159)
|
|
311
304
|
|
|
312
305
|
___
|
|
313
306
|
|
|
@@ -332,17 +325,17 @@ ___
|
|
|
332
325
|
|
|
333
326
|
#### Defined in
|
|
334
327
|
|
|
335
|
-
[config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/
|
|
328
|
+
[config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L1)
|
|
336
329
|
|
|
337
330
|
___
|
|
338
331
|
|
|
339
332
|
### GeocodingFeature
|
|
340
333
|
|
|
341
|
-
Ƭ **GeocodingFeature**: `Feature` & { `address?`: `string` ; `bbox`: `BBox` ; `center`: [`Coordinates`](README.md#coordinates) ; `context?`: [`FeatureHierarchy`](README.md#featurehierarchy)[] ; `place_name`: `string` ; `
|
|
334
|
+
Ƭ **GeocodingFeature**: `Feature`<`Geometry`, `FeatureProperties`\> & `FeatureBase` & { `[key: `place_name_${string}`]`: `string`; `address?`: `string` ; `bbox`: `BBox` ; `center`: [`Coordinates`](README.md#coordinates) ; `context?`: [`FeatureHierarchy`](README.md#featurehierarchy)[] ; `place_name`: `string` ; `place_type`: `string`[] ; `place_type_name`: `string`[] ; `relevance`: `number` }
|
|
342
335
|
|
|
343
336
|
#### Defined in
|
|
344
337
|
|
|
345
|
-
[services/geocoding.ts:
|
|
338
|
+
[services/geocoding.ts:161](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L161)
|
|
346
339
|
|
|
347
340
|
___
|
|
348
341
|
|
|
@@ -352,7 +345,7 @@ ___
|
|
|
352
345
|
|
|
353
346
|
#### Defined in
|
|
354
347
|
|
|
355
|
-
[services/geocoding.ts:
|
|
348
|
+
[services/geocoding.ts:58](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L58)
|
|
356
349
|
|
|
357
350
|
___
|
|
358
351
|
|
|
@@ -371,7 +364,7 @@ ___
|
|
|
371
364
|
|
|
372
365
|
#### Defined in
|
|
373
366
|
|
|
374
|
-
[services/geocoding.ts:
|
|
367
|
+
[services/geocoding.ts:213](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L213)
|
|
375
368
|
|
|
376
369
|
___
|
|
377
370
|
|
|
@@ -389,7 +382,7 @@ Options that can be provided to get user data.
|
|
|
389
382
|
|
|
390
383
|
#### Defined in
|
|
391
384
|
|
|
392
|
-
[services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/
|
|
385
|
+
[services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geolocation.ts#L14)
|
|
393
386
|
|
|
394
387
|
___
|
|
395
388
|
|
|
@@ -418,7 +411,7 @@ ___
|
|
|
418
411
|
|
|
419
412
|
#### Defined in
|
|
420
413
|
|
|
421
|
-
[services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/
|
|
414
|
+
[services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geolocation.ts#L21)
|
|
422
415
|
|
|
423
416
|
___
|
|
424
417
|
|
|
@@ -436,7 +429,7 @@ Options that can be provided to get user data.
|
|
|
436
429
|
|
|
437
430
|
#### Defined in
|
|
438
431
|
|
|
439
|
-
[services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/
|
|
432
|
+
[services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/data.ts#L14)
|
|
440
433
|
|
|
441
434
|
___
|
|
442
435
|
|
|
@@ -452,7 +445,7 @@ ___
|
|
|
452
445
|
|
|
453
446
|
#### Defined in
|
|
454
447
|
|
|
455
|
-
[services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/
|
|
448
|
+
[services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L18)
|
|
456
449
|
|
|
457
450
|
___
|
|
458
451
|
|
|
@@ -464,7 +457,7 @@ Built-in languages values as strings
|
|
|
464
457
|
|
|
465
458
|
#### Defined in
|
|
466
459
|
|
|
467
|
-
[language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/
|
|
460
|
+
[language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/language.ts#L69)
|
|
468
461
|
|
|
469
462
|
___
|
|
470
463
|
|
|
@@ -485,7 +478,7 @@ Type for object containing style details
|
|
|
485
478
|
|
|
486
479
|
#### Defined in
|
|
487
480
|
|
|
488
|
-
[mapstyle.ts:29](https://github.com/maptiler/maptiler-client-js/blob/
|
|
481
|
+
[mapstyle.ts:29](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L29)
|
|
489
482
|
|
|
490
483
|
___
|
|
491
484
|
|
|
@@ -516,7 +509,7 @@ All the styles and variants maintained by MapTiler.
|
|
|
516
509
|
|
|
517
510
|
#### Defined in
|
|
518
511
|
|
|
519
|
-
[mapstyle.ts:258](https://github.com/maptiler/maptiler-client-js/blob/
|
|
512
|
+
[mapstyle.ts:258](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L258)
|
|
520
513
|
|
|
521
514
|
___
|
|
522
515
|
|
|
@@ -526,7 +519,7 @@ ___
|
|
|
526
519
|
|
|
527
520
|
#### Defined in
|
|
528
521
|
|
|
529
|
-
[services/geocoding.ts:
|
|
522
|
+
[services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L86)
|
|
530
523
|
|
|
531
524
|
___
|
|
532
525
|
|
|
@@ -557,7 +550,7 @@ Base set of options that can be provided to all the types of static maps
|
|
|
557
550
|
|
|
558
551
|
#### Defined in
|
|
559
552
|
|
|
560
|
-
[services/staticMaps.ts:10](https://github.com/maptiler/maptiler-client-js/blob/
|
|
553
|
+
[services/staticMaps.ts:10](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L10)
|
|
561
554
|
|
|
562
555
|
___
|
|
563
556
|
|
|
@@ -569,7 +562,7 @@ Definition of a maker to show on a static map
|
|
|
569
562
|
|
|
570
563
|
#### Defined in
|
|
571
564
|
|
|
572
|
-
[services/staticMaps.ts:146](https://github.com/maptiler/maptiler-client-js/blob/
|
|
565
|
+
[services/staticMaps.ts:146](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L146)
|
|
573
566
|
|
|
574
567
|
___
|
|
575
568
|
|
|
@@ -587,7 +580,7 @@ ___
|
|
|
587
580
|
|
|
588
581
|
#### Defined in
|
|
589
582
|
|
|
590
|
-
[services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/
|
|
583
|
+
[services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L153)
|
|
591
584
|
|
|
592
585
|
## Variables
|
|
593
586
|
|
|
@@ -659,7 +652,7 @@ Languages. Note that not all the languages of this list are available but the co
|
|
|
659
652
|
|
|
660
653
|
#### Defined in
|
|
661
654
|
|
|
662
|
-
[language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/
|
|
655
|
+
[language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/language.ts#L4)
|
|
663
656
|
|
|
664
657
|
___
|
|
665
658
|
|
|
@@ -675,7 +668,7 @@ For example, `MapStyle.STREETS` and the variants:
|
|
|
675
668
|
|
|
676
669
|
#### Defined in
|
|
677
670
|
|
|
678
|
-
[mapstyle.ts:968](https://github.com/maptiler/maptiler-client-js/blob/
|
|
671
|
+
[mapstyle.ts:968](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L968)
|
|
679
672
|
|
|
680
673
|
___
|
|
681
674
|
|
|
@@ -687,7 +680,7 @@ Configuration object
|
|
|
687
680
|
|
|
688
681
|
#### Defined in
|
|
689
682
|
|
|
690
|
-
[config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/
|
|
683
|
+
[config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L63)
|
|
691
684
|
|
|
692
685
|
___
|
|
693
686
|
|
|
@@ -707,7 +700,7 @@ The goal of the **Coordinate API* is query information about spatial coordinate
|
|
|
707
700
|
|
|
708
701
|
#### Defined in
|
|
709
702
|
|
|
710
|
-
[services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/
|
|
703
|
+
[services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/coordinates.ts#L253)
|
|
711
704
|
|
|
712
705
|
___
|
|
713
706
|
|
|
@@ -726,7 +719,7 @@ The **Data API** provides a way to retrieve user data in GeoJSON format.
|
|
|
726
719
|
|
|
727
720
|
#### Defined in
|
|
728
721
|
|
|
729
|
-
[services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/
|
|
722
|
+
[services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/data.ts#L59)
|
|
730
723
|
|
|
731
724
|
___
|
|
732
725
|
|
|
@@ -805,7 +798,7 @@ and to get the location details (country, city, street, etc.) from a geographic
|
|
|
805
798
|
|
|
806
799
|
#### Defined in
|
|
807
800
|
|
|
808
|
-
[services/geocoding.ts:
|
|
801
|
+
[services/geocoding.ts:450](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geocoding.ts#L450)
|
|
809
802
|
|
|
810
803
|
___
|
|
811
804
|
|
|
@@ -824,7 +817,7 @@ The **Geolocation API** provides a way to retrieve the IP address as well as geo
|
|
|
824
817
|
|
|
825
818
|
#### Defined in
|
|
826
819
|
|
|
827
|
-
[services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/
|
|
820
|
+
[services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/geolocation.ts#L135)
|
|
828
821
|
|
|
829
822
|
___
|
|
830
823
|
|
|
@@ -834,7 +827,7 @@ ___
|
|
|
834
827
|
|
|
835
828
|
#### Defined in
|
|
836
829
|
|
|
837
|
-
[mapstyle.ts:503](https://github.com/maptiler/maptiler-client-js/blob/
|
|
830
|
+
[mapstyle.ts:503](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L503)
|
|
838
831
|
|
|
839
832
|
___
|
|
840
833
|
|
|
@@ -855,7 +848,7 @@ The URL of static maps can then be used within a `<img />` markup element, as th
|
|
|
855
848
|
|
|
856
849
|
#### Defined in
|
|
857
850
|
|
|
858
|
-
[services/staticMaps.ts:457](https://github.com/maptiler/maptiler-client-js/blob/
|
|
851
|
+
[services/staticMaps.ts:457](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/staticMaps.ts#L457)
|
|
859
852
|
|
|
860
853
|
## Functions
|
|
861
854
|
|
|
@@ -877,4 +870,4 @@ Expand the map style provided as argument of the Map constructor
|
|
|
877
870
|
|
|
878
871
|
#### Defined in
|
|
879
872
|
|
|
880
|
-
[mapstyle.ts:6](https://github.com/maptiler/maptiler-client-js/blob/
|
|
873
|
+
[mapstyle.ts:6](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L6)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.
|
|
1
|
+
[MapTiler Client - v1.6.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/
|
|
38
|
+
[config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/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/
|
|
56
|
+
[config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/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/
|
|
72
|
+
[config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/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/
|
|
90
|
+
[config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L48)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.
|
|
1
|
+
[MapTiler Client - v1.6.0](../README.md) / MapStyleVariant
|
|
2
2
|
|
|
3
3
|
# Class: MapStyleVariant
|
|
4
4
|
|
|
@@ -43,7 +43,7 @@ An instance of MapStyleVariant contains information about a style to use that be
|
|
|
43
43
|
|
|
44
44
|
#### Defined in
|
|
45
45
|
|
|
46
|
-
[mapstyle.ts:46](https://github.com/maptiler/maptiler-client-js/blob/
|
|
46
|
+
[mapstyle.ts:46](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L46)
|
|
47
47
|
|
|
48
48
|
## Methods
|
|
49
49
|
|
|
@@ -59,7 +59,7 @@ Get the human-friendly description
|
|
|
59
59
|
|
|
60
60
|
#### Defined in
|
|
61
61
|
|
|
62
|
-
[mapstyle.ts:109](https://github.com/maptiler/maptiler-client-js/blob/
|
|
62
|
+
[mapstyle.ts:109](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L109)
|
|
63
63
|
|
|
64
64
|
___
|
|
65
65
|
|
|
@@ -75,7 +75,7 @@ Get the style as usable by MapLibre, a string (URL) or a plain style description
|
|
|
75
75
|
|
|
76
76
|
#### Defined in
|
|
77
77
|
|
|
78
|
-
[mapstyle.ts:161](https://github.com/maptiler/maptiler-client-js/blob/
|
|
78
|
+
[mapstyle.ts:161](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L161)
|
|
79
79
|
|
|
80
80
|
___
|
|
81
81
|
|
|
@@ -89,7 +89,7 @@ ___
|
|
|
89
89
|
|
|
90
90
|
#### Defined in
|
|
91
91
|
|
|
92
|
-
[mapstyle.ts:86](https://github.com/maptiler/maptiler-client-js/blob/
|
|
92
|
+
[mapstyle.ts:86](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L86)
|
|
93
93
|
|
|
94
94
|
___
|
|
95
95
|
|
|
@@ -105,7 +105,7 @@ Get the MapTiler Cloud id
|
|
|
105
105
|
|
|
106
106
|
#### Defined in
|
|
107
107
|
|
|
108
|
-
[mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/
|
|
108
|
+
[mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L102)
|
|
109
109
|
|
|
110
110
|
___
|
|
111
111
|
|
|
@@ -121,7 +121,7 @@ Get the image URL that represent _this_ variant
|
|
|
121
121
|
|
|
122
122
|
#### Defined in
|
|
123
123
|
|
|
124
|
-
[mapstyle.ts:153](https://github.com/maptiler/maptiler-client-js/blob/
|
|
124
|
+
[mapstyle.ts:153](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L153)
|
|
125
125
|
|
|
126
126
|
___
|
|
127
127
|
|
|
@@ -137,7 +137,7 @@ Get the human-friendly name
|
|
|
137
137
|
|
|
138
138
|
#### Defined in
|
|
139
139
|
|
|
140
|
-
[mapstyle.ts:82](https://github.com/maptiler/maptiler-client-js/blob/
|
|
140
|
+
[mapstyle.ts:82](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L82)
|
|
141
141
|
|
|
142
142
|
___
|
|
143
143
|
|
|
@@ -153,7 +153,7 @@ Get the reference style this variant belongs to
|
|
|
153
153
|
|
|
154
154
|
#### Defined in
|
|
155
155
|
|
|
156
|
-
[mapstyle.ts:117](https://github.com/maptiler/maptiler-client-js/blob/
|
|
156
|
+
[mapstyle.ts:117](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L117)
|
|
157
157
|
|
|
158
158
|
___
|
|
159
159
|
|
|
@@ -169,7 +169,7 @@ Get the variant type (eg. "DEFAULT", "DARK", "PASTEL", etc.)
|
|
|
169
169
|
|
|
170
170
|
#### Defined in
|
|
171
171
|
|
|
172
|
-
[mapstyle.ts:94](https://github.com/maptiler/maptiler-client-js/blob/
|
|
172
|
+
[mapstyle.ts:94](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L94)
|
|
173
173
|
|
|
174
174
|
___
|
|
175
175
|
|
|
@@ -192,7 +192,7 @@ Retrieve the variant of a given type. If not found, will return the "DEFAULT" va
|
|
|
192
192
|
|
|
193
193
|
#### Defined in
|
|
194
194
|
|
|
195
|
-
[mapstyle.ts:137](https://github.com/maptiler/maptiler-client-js/blob/
|
|
195
|
+
[mapstyle.ts:137](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L137)
|
|
196
196
|
|
|
197
197
|
___
|
|
198
198
|
|
|
@@ -208,7 +208,7 @@ Get all the variants for _this_ variants, except _this_ current one
|
|
|
208
208
|
|
|
209
209
|
#### Defined in
|
|
210
210
|
|
|
211
|
-
[mapstyle.ts:145](https://github.com/maptiler/maptiler-client-js/blob/
|
|
211
|
+
[mapstyle.ts:145](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L145)
|
|
212
212
|
|
|
213
213
|
___
|
|
214
214
|
|
|
@@ -231,4 +231,4 @@ Check if a variant of a given type exists for _this_ variants
|
|
|
231
231
|
|
|
232
232
|
#### Defined in
|
|
233
233
|
|
|
234
|
-
[mapstyle.ts:127](https://github.com/maptiler/maptiler-client-js/blob/
|
|
234
|
+
[mapstyle.ts:127](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L127)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.
|
|
1
|
+
[MapTiler Client - v1.6.0](../README.md) / ReferenceMapStyle
|
|
2
2
|
|
|
3
3
|
# Class: ReferenceMapStyle
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@ An instance of reference style contains a list of StyleVariants ordered by relev
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[mapstyle.ts:180](https://github.com/maptiler/maptiler-client-js/blob/
|
|
38
|
+
[mapstyle.ts:180](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L180)
|
|
39
39
|
|
|
40
40
|
## Methods
|
|
41
41
|
|
|
@@ -57,7 +57,7 @@ Add a variant to _this_ reference style
|
|
|
57
57
|
|
|
58
58
|
#### Defined in
|
|
59
59
|
|
|
60
|
-
[mapstyle.ts:212](https://github.com/maptiler/maptiler-client-js/blob/
|
|
60
|
+
[mapstyle.ts:212](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L212)
|
|
61
61
|
|
|
62
62
|
___
|
|
63
63
|
|
|
@@ -73,7 +73,7 @@ Get the defualt variant for this reference style
|
|
|
73
73
|
|
|
74
74
|
#### Defined in
|
|
75
75
|
|
|
76
|
-
[mapstyle.ts:250](https://github.com/maptiler/maptiler-client-js/blob/
|
|
76
|
+
[mapstyle.ts:250](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L250)
|
|
77
77
|
|
|
78
78
|
___
|
|
79
79
|
|
|
@@ -89,7 +89,7 @@ Get the id of _this_ reference style
|
|
|
89
89
|
|
|
90
90
|
#### Defined in
|
|
91
91
|
|
|
92
|
-
[mapstyle.ts:204](https://github.com/maptiler/maptiler-client-js/blob/
|
|
92
|
+
[mapstyle.ts:204](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L204)
|
|
93
93
|
|
|
94
94
|
___
|
|
95
95
|
|
|
@@ -105,7 +105,7 @@ Get the human-friendly name of this reference style
|
|
|
105
105
|
|
|
106
106
|
#### Defined in
|
|
107
107
|
|
|
108
|
-
[mapstyle.ts:196](https://github.com/maptiler/maptiler-client-js/blob/
|
|
108
|
+
[mapstyle.ts:196](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L196)
|
|
109
109
|
|
|
110
110
|
___
|
|
111
111
|
|
|
@@ -128,7 +128,7 @@ then the most relevant default variant is returned instead
|
|
|
128
128
|
|
|
129
129
|
#### Defined in
|
|
130
130
|
|
|
131
|
-
[mapstyle.ts:232](https://github.com/maptiler/maptiler-client-js/blob/
|
|
131
|
+
[mapstyle.ts:232](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L232)
|
|
132
132
|
|
|
133
133
|
___
|
|
134
134
|
|
|
@@ -144,7 +144,7 @@ Get the list of variants for this reference style
|
|
|
144
144
|
|
|
145
145
|
#### Defined in
|
|
146
146
|
|
|
147
|
-
[mapstyle.ts:242](https://github.com/maptiler/maptiler-client-js/blob/
|
|
147
|
+
[mapstyle.ts:242](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L242)
|
|
148
148
|
|
|
149
149
|
___
|
|
150
150
|
|
|
@@ -166,4 +166,4 @@ Check if a given variant type exists for this reference style
|
|
|
166
166
|
|
|
167
167
|
#### Defined in
|
|
168
168
|
|
|
169
|
-
[mapstyle.ts:222](https://github.com/maptiler/maptiler-client-js/blob/
|
|
169
|
+
[mapstyle.ts:222](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L222)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.
|
|
1
|
+
[MapTiler Client - v1.6.0](../README.md) / ServiceError
|
|
2
2
|
|
|
3
3
|
# Class: ServiceError
|
|
4
4
|
|
|
@@ -39,7 +39,7 @@ Error.constructor
|
|
|
39
39
|
|
|
40
40
|
#### Defined in
|
|
41
41
|
|
|
42
|
-
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/
|
|
42
|
+
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/ServiceError.ts#L5)
|
|
43
43
|
|
|
44
44
|
## Properties
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ Error.constructor
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/
|
|
52
|
+
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/ServiceError.ts#L5)
|
package/examples/test-node.js
CHANGED
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// For this examople to work, you must bring your own node-compatible fetch,
|
|
11
11
|
// unles you are using a version of Nodejs that already contains fetch (>=18)
|
|
12
|
-
import fetch from 'node-fetch';
|
|
12
|
+
// import fetch from 'node-fetch';
|
|
13
13
|
|
|
14
|
-
config.fetch = fetch;
|
|
15
|
-
config.apiKey = '
|
|
14
|
+
// config.fetch = fetch;
|
|
15
|
+
config.apiKey = 'YOUR_MAPTILER_CLOUD_API_KEY';
|
|
16
16
|
|
|
17
17
|
async function testGeocoding() {
|
|
18
|
-
const result1 = await geocoding.forward('bordeaux', {language: [LanguageGeocoding.AUTO, LanguageGeocoding.ENGLISH]});
|
|
19
|
-
console.log(result1);
|
|
18
|
+
// const result1 = await geocoding.forward('bordeaux', {language: [LanguageGeocoding.AUTO, LanguageGeocoding.ENGLISH]});
|
|
19
|
+
// console.log(result1);
|
|
20
20
|
|
|
21
|
-
const result2 = await geocoding.reverse(
|
|
21
|
+
const result2 = await geocoding.reverse([6.249638, 46.402056], {language: ['es', 'en']});
|
|
22
22
|
console.log(result2);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -46,7 +46,7 @@ async function testData() {
|
|
|
46
46
|
|
|
47
47
|
(async () => {
|
|
48
48
|
await testGeocoding();
|
|
49
|
-
await testGeolocation();
|
|
50
|
-
await testCoordinates();
|
|
51
|
-
await testData();
|
|
49
|
+
// await testGeolocation();
|
|
50
|
+
// await testCoordinates();
|
|
51
|
+
// await testData();
|
|
52
52
|
})()
|