@maptiler/client 1.1.0 → 1.1.2
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 +122 -1
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +12 -2
- package/dist/maptiler-client.min.mjs +1 -1
- package/dist/maptiler-client.mjs +122 -1
- package/dist/maptiler-client.mjs.map +1 -1
- package/dist/maptiler-client.umd.js +123 -2
- package/dist/maptiler-client.umd.js.map +1 -1
- package/dist/maptiler-client.umd.min.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 +28 -35
- 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.Coordinates.html +5 -5
- package/docs/types/services_geocoding.FeatureHierarchy.html +5 -5
- package/docs/types/services_geocoding.GeocodingFeature.html +5 -5
- package/docs/types/services_geocoding.GeocodingOptions.html +5 -5
- package/docs/types/services_geocoding.GeocodingSearchResult.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 +46 -44
- package/docsmd/classes/ClientConfig.md +5 -5
- package/docsmd/classes/MapStyleVariant.md +29 -12
- package/docsmd/classes/ReferenceMapStyle.md +9 -9
- package/docsmd/classes/ServiceError.md +3 -3
- package/examples/test-browser-es.html +2 -1
- package/examples/test-browser-umd.html +17 -16
- package/package.json +1 -1
- package/readme.md +28 -28
- package/rollup.config.js +2 -2
- package/src/index.ts +2 -2
- package/src/mapstyle.ts +33 -0
package/docsmd/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
MapTiler Client - v1.1.
|
|
1
|
+
MapTiler Client - v1.1.2
|
|
2
2
|
|
|
3
|
-
# MapTiler Client - v1.1.
|
|
3
|
+
# MapTiler Client - v1.1.2
|
|
4
4
|
|
|
5
5
|
## Table of contents
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ MapTiler Client - v1.1.0
|
|
|
56
56
|
|
|
57
57
|
### Functions
|
|
58
58
|
|
|
59
|
-
- [
|
|
59
|
+
- [expandMapStyle](README.md#expandmapstyle)
|
|
60
60
|
|
|
61
61
|
## Type Aliases
|
|
62
62
|
|
|
@@ -68,7 +68,7 @@ Options that can be provided to automatic static maps
|
|
|
68
68
|
|
|
69
69
|
#### Defined in
|
|
70
70
|
|
|
71
|
-
[services/staticMaps.ts:141](https://github.com/maptiler/maptiler-client-js/blob/
|
|
71
|
+
[services/staticMaps.ts:141](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L141)
|
|
72
72
|
|
|
73
73
|
___
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ Options that can be provided to bounded static maps
|
|
|
80
80
|
|
|
81
81
|
#### Defined in
|
|
82
82
|
|
|
83
|
-
[services/staticMaps.ts:130](https://github.com/maptiler/maptiler-client-js/blob/
|
|
83
|
+
[services/staticMaps.ts:130](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L130)
|
|
84
84
|
|
|
85
85
|
___
|
|
86
86
|
|
|
@@ -92,7 +92,7 @@ Options that can be provided to centered static maps
|
|
|
92
92
|
|
|
93
93
|
#### Defined in
|
|
94
94
|
|
|
95
|
-
[services/staticMaps.ts:125](https://github.com/maptiler/maptiler-client-js/blob/
|
|
95
|
+
[services/staticMaps.ts:125](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L125)
|
|
96
96
|
|
|
97
97
|
___
|
|
98
98
|
|
|
@@ -109,7 +109,7 @@ ___
|
|
|
109
109
|
|
|
110
110
|
#### Defined in
|
|
111
111
|
|
|
112
|
-
[services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/
|
|
112
|
+
[services/coordinates.ts:38](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L38)
|
|
113
113
|
|
|
114
114
|
___
|
|
115
115
|
|
|
@@ -125,7 +125,7 @@ ___
|
|
|
125
125
|
|
|
126
126
|
#### Defined in
|
|
127
127
|
|
|
128
|
-
[services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/
|
|
128
|
+
[services/coordinates.ts:43](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L43)
|
|
129
129
|
|
|
130
130
|
___
|
|
131
131
|
|
|
@@ -142,7 +142,7 @@ ___
|
|
|
142
142
|
|
|
143
143
|
#### Defined in
|
|
144
144
|
|
|
145
|
-
[services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/
|
|
145
|
+
[services/coordinates.ts:33](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L33)
|
|
146
146
|
|
|
147
147
|
___
|
|
148
148
|
|
|
@@ -168,7 +168,7 @@ ___
|
|
|
168
168
|
|
|
169
169
|
#### Defined in
|
|
170
170
|
|
|
171
|
-
[services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/
|
|
171
|
+
[services/coordinates.ts:61](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L61)
|
|
172
172
|
|
|
173
173
|
___
|
|
174
174
|
|
|
@@ -185,7 +185,7 @@ ___
|
|
|
185
185
|
|
|
186
186
|
#### Defined in
|
|
187
187
|
|
|
188
|
-
[services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/
|
|
188
|
+
[services/coordinates.ts:91](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L91)
|
|
189
189
|
|
|
190
190
|
___
|
|
191
191
|
|
|
@@ -202,7 +202,7 @@ ___
|
|
|
202
202
|
|
|
203
203
|
#### Defined in
|
|
204
204
|
|
|
205
|
-
[services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/
|
|
205
|
+
[services/coordinates.ts:159](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L159)
|
|
206
206
|
|
|
207
207
|
___
|
|
208
208
|
|
|
@@ -228,7 +228,7 @@ ___
|
|
|
228
228
|
|
|
229
229
|
#### Defined in
|
|
230
230
|
|
|
231
|
-
[services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/
|
|
231
|
+
[services/coordinates.ts:47](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L47)
|
|
232
232
|
|
|
233
233
|
___
|
|
234
234
|
|
|
@@ -238,7 +238,7 @@ ___
|
|
|
238
238
|
|
|
239
239
|
#### Defined in
|
|
240
240
|
|
|
241
|
-
[services/geocoding.ts:40](https://github.com/maptiler/maptiler-client-js/blob/
|
|
241
|
+
[services/geocoding.ts:40](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L40)
|
|
242
242
|
|
|
243
243
|
___
|
|
244
244
|
|
|
@@ -257,7 +257,7 @@ ___
|
|
|
257
257
|
|
|
258
258
|
#### Defined in
|
|
259
259
|
|
|
260
|
-
[services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/
|
|
260
|
+
[services/coordinates.ts:11](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L11)
|
|
261
261
|
|
|
262
262
|
___
|
|
263
263
|
|
|
@@ -278,7 +278,7 @@ Options that can be provided when transforming a coordinate from one CRS to anot
|
|
|
278
278
|
|
|
279
279
|
#### Defined in
|
|
280
280
|
|
|
281
|
-
[services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/
|
|
281
|
+
[services/coordinates.ts:174](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L174)
|
|
282
282
|
|
|
283
283
|
___
|
|
284
284
|
|
|
@@ -295,7 +295,7 @@ ___
|
|
|
295
295
|
|
|
296
296
|
#### Defined in
|
|
297
297
|
|
|
298
|
-
[services/geocoding.ts:42](https://github.com/maptiler/maptiler-client-js/blob/
|
|
298
|
+
[services/geocoding.ts:42](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L42)
|
|
299
299
|
|
|
300
300
|
___
|
|
301
301
|
|
|
@@ -320,7 +320,7 @@ ___
|
|
|
320
320
|
|
|
321
321
|
#### Defined in
|
|
322
322
|
|
|
323
|
-
[config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/
|
|
323
|
+
[config.ts:1](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L1)
|
|
324
324
|
|
|
325
325
|
___
|
|
326
326
|
|
|
@@ -330,7 +330,7 @@ ___
|
|
|
330
330
|
|
|
331
331
|
#### Defined in
|
|
332
332
|
|
|
333
|
-
[services/geocoding.ts:54](https://github.com/maptiler/maptiler-client-js/blob/
|
|
333
|
+
[services/geocoding.ts:54](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L54)
|
|
334
334
|
|
|
335
335
|
___
|
|
336
336
|
|
|
@@ -349,7 +349,7 @@ ___
|
|
|
349
349
|
|
|
350
350
|
#### Defined in
|
|
351
351
|
|
|
352
|
-
[services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/
|
|
352
|
+
[services/geocoding.ts:18](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L18)
|
|
353
353
|
|
|
354
354
|
___
|
|
355
355
|
|
|
@@ -368,7 +368,7 @@ ___
|
|
|
368
368
|
|
|
369
369
|
#### Defined in
|
|
370
370
|
|
|
371
|
-
[services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/
|
|
371
|
+
[services/geocoding.ts:86](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L86)
|
|
372
372
|
|
|
373
373
|
___
|
|
374
374
|
|
|
@@ -386,7 +386,7 @@ Options that can be provided to get user data.
|
|
|
386
386
|
|
|
387
387
|
#### Defined in
|
|
388
388
|
|
|
389
|
-
[services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/
|
|
389
|
+
[services/geolocation.ts:14](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geolocation.ts#L14)
|
|
390
390
|
|
|
391
391
|
___
|
|
392
392
|
|
|
@@ -415,7 +415,7 @@ ___
|
|
|
415
415
|
|
|
416
416
|
#### Defined in
|
|
417
417
|
|
|
418
|
-
[services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/
|
|
418
|
+
[services/geolocation.ts:21](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geolocation.ts#L21)
|
|
419
419
|
|
|
420
420
|
___
|
|
421
421
|
|
|
@@ -433,7 +433,7 @@ Options that can be provided to get user data.
|
|
|
433
433
|
|
|
434
434
|
#### Defined in
|
|
435
435
|
|
|
436
|
-
[services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/
|
|
436
|
+
[services/data.ts:14](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/data.ts#L14)
|
|
437
437
|
|
|
438
438
|
___
|
|
439
439
|
|
|
@@ -445,7 +445,7 @@ Built-in languages values as strings
|
|
|
445
445
|
|
|
446
446
|
#### Defined in
|
|
447
447
|
|
|
448
|
-
[language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/
|
|
448
|
+
[language.ts:69](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/language.ts#L69)
|
|
449
449
|
|
|
450
450
|
___
|
|
451
451
|
|
|
@@ -466,7 +466,7 @@ Type for object containing style details
|
|
|
466
466
|
|
|
467
467
|
#### Defined in
|
|
468
468
|
|
|
469
|
-
[mapstyle.ts:
|
|
469
|
+
[mapstyle.ts:29](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L29)
|
|
470
470
|
|
|
471
471
|
___
|
|
472
472
|
|
|
@@ -496,7 +496,7 @@ All the styles and variants maintained by MapTiler.
|
|
|
496
496
|
|
|
497
497
|
#### Defined in
|
|
498
498
|
|
|
499
|
-
[mapstyle.ts:
|
|
499
|
+
[mapstyle.ts:258](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L258)
|
|
500
500
|
|
|
501
501
|
___
|
|
502
502
|
|
|
@@ -513,7 +513,7 @@ ___
|
|
|
513
513
|
|
|
514
514
|
#### Defined in
|
|
515
515
|
|
|
516
|
-
[services/geocoding.ts:165](https://github.com/maptiler/maptiler-client-js/blob/
|
|
516
|
+
[services/geocoding.ts:165](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L165)
|
|
517
517
|
|
|
518
518
|
___
|
|
519
519
|
|
|
@@ -544,7 +544,7 @@ Base set of options that can be provided to all the types of static maps
|
|
|
544
544
|
|
|
545
545
|
#### Defined in
|
|
546
546
|
|
|
547
|
-
[services/staticMaps.ts:10](https://github.com/maptiler/maptiler-client-js/blob/
|
|
547
|
+
[services/staticMaps.ts:10](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L10)
|
|
548
548
|
|
|
549
549
|
___
|
|
550
550
|
|
|
@@ -556,7 +556,7 @@ Definition of a maker to show on a static map
|
|
|
556
556
|
|
|
557
557
|
#### Defined in
|
|
558
558
|
|
|
559
|
-
[services/staticMaps.ts:146](https://github.com/maptiler/maptiler-client-js/blob/
|
|
559
|
+
[services/staticMaps.ts:146](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L146)
|
|
560
560
|
|
|
561
561
|
___
|
|
562
562
|
|
|
@@ -574,7 +574,7 @@ ___
|
|
|
574
574
|
|
|
575
575
|
#### Defined in
|
|
576
576
|
|
|
577
|
-
[services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/
|
|
577
|
+
[services/coordinates.ts:153](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L153)
|
|
578
578
|
|
|
579
579
|
## Variables
|
|
580
580
|
|
|
@@ -646,7 +646,7 @@ Languages. Note that not all the languages of this list are available but the co
|
|
|
646
646
|
|
|
647
647
|
#### Defined in
|
|
648
648
|
|
|
649
|
-
[language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/
|
|
649
|
+
[language.ts:4](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/language.ts#L4)
|
|
650
650
|
|
|
651
651
|
___
|
|
652
652
|
|
|
@@ -662,7 +662,7 @@ For example, `MapStyle.STREETS` and the variants:
|
|
|
662
662
|
|
|
663
663
|
#### Defined in
|
|
664
664
|
|
|
665
|
-
[mapstyle.ts:
|
|
665
|
+
[mapstyle.ts:874](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L874)
|
|
666
666
|
|
|
667
667
|
___
|
|
668
668
|
|
|
@@ -674,7 +674,7 @@ Configuration object
|
|
|
674
674
|
|
|
675
675
|
#### Defined in
|
|
676
676
|
|
|
677
|
-
[config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/
|
|
677
|
+
[config.ts:63](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L63)
|
|
678
678
|
|
|
679
679
|
___
|
|
680
680
|
|
|
@@ -694,7 +694,7 @@ The goal of the **Coordinate API* is query information about spatial coordinate
|
|
|
694
694
|
|
|
695
695
|
#### Defined in
|
|
696
696
|
|
|
697
|
-
[services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/
|
|
697
|
+
[services/coordinates.ts:253](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/coordinates.ts#L253)
|
|
698
698
|
|
|
699
699
|
___
|
|
700
700
|
|
|
@@ -713,7 +713,7 @@ The **Data API** provides a way to retrieve user data in GeoJSON format.
|
|
|
713
713
|
|
|
714
714
|
#### Defined in
|
|
715
715
|
|
|
716
|
-
[services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/
|
|
716
|
+
[services/data.ts:59](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/data.ts#L59)
|
|
717
717
|
|
|
718
718
|
___
|
|
719
719
|
|
|
@@ -790,7 +790,7 @@ and to get the location details (country, city, street, etc.) from a geographic
|
|
|
790
790
|
|
|
791
791
|
#### Defined in
|
|
792
792
|
|
|
793
|
-
[services/geocoding.ts:233](https://github.com/maptiler/maptiler-client-js/blob/
|
|
793
|
+
[services/geocoding.ts:233](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geocoding.ts#L233)
|
|
794
794
|
|
|
795
795
|
___
|
|
796
796
|
|
|
@@ -809,7 +809,7 @@ The **Geolocation API** provides a way to retrieve the IP address as well as geo
|
|
|
809
809
|
|
|
810
810
|
#### Defined in
|
|
811
811
|
|
|
812
|
-
[services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/
|
|
812
|
+
[services/geolocation.ts:135](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/geolocation.ts#L135)
|
|
813
813
|
|
|
814
814
|
___
|
|
815
815
|
|
|
@@ -819,7 +819,7 @@ ___
|
|
|
819
819
|
|
|
820
820
|
#### Defined in
|
|
821
821
|
|
|
822
|
-
[mapstyle.ts:
|
|
822
|
+
[mapstyle.ts:466](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L466)
|
|
823
823
|
|
|
824
824
|
___
|
|
825
825
|
|
|
@@ -840,19 +840,21 @@ The URL of static maps can then be used within a `<img />` markup element, as th
|
|
|
840
840
|
|
|
841
841
|
#### Defined in
|
|
842
842
|
|
|
843
|
-
[services/staticMaps.ts:457](https://github.com/maptiler/maptiler-client-js/blob/
|
|
843
|
+
[services/staticMaps.ts:457](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/staticMaps.ts#L457)
|
|
844
844
|
|
|
845
845
|
## Functions
|
|
846
846
|
|
|
847
|
-
###
|
|
847
|
+
### expandMapStyle
|
|
848
848
|
|
|
849
|
-
▸ **
|
|
849
|
+
▸ **expandMapStyle**(`style`): `string`
|
|
850
|
+
|
|
851
|
+
Expand the map style provided as argument of the Map constructor
|
|
850
852
|
|
|
851
853
|
#### Parameters
|
|
852
854
|
|
|
853
855
|
| Name | Type |
|
|
854
856
|
| :------ | :------ |
|
|
855
|
-
| `style` | `
|
|
857
|
+
| `style` | `any` |
|
|
856
858
|
|
|
857
859
|
#### Returns
|
|
858
860
|
|
|
@@ -860,4 +862,4 @@ The URL of static maps can then be used within a `<img />` markup element, as th
|
|
|
860
862
|
|
|
861
863
|
#### Defined in
|
|
862
864
|
|
|
863
|
-
[mapstyle.ts:
|
|
865
|
+
[mapstyle.ts:6](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L6)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.1.
|
|
1
|
+
[MapTiler Client - v1.1.2](../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/ec0b213/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/ec0b213/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/ec0b213/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/ec0b213/src/config.ts#L48)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.1.
|
|
1
|
+
[MapTiler Client - v1.1.2](../README.md) / MapStyleVariant
|
|
2
2
|
|
|
3
3
|
# Class: MapStyleVariant
|
|
4
4
|
|
|
@@ -13,6 +13,7 @@ An instance of MapStyleVariant contains information about a style to use that be
|
|
|
13
13
|
### Methods
|
|
14
14
|
|
|
15
15
|
- [getDescription](MapStyleVariant.md#getdescription)
|
|
16
|
+
- [getExpandedStyleURL](MapStyleVariant.md#getexpandedstyleurl)
|
|
16
17
|
- [getFullName](MapStyleVariant.md#getfullname)
|
|
17
18
|
- [getId](MapStyleVariant.md#getid)
|
|
18
19
|
- [getImageURL](MapStyleVariant.md#getimageurl)
|
|
@@ -42,7 +43,7 @@ An instance of MapStyleVariant contains information about a style to use that be
|
|
|
42
43
|
|
|
43
44
|
#### Defined in
|
|
44
45
|
|
|
45
|
-
[mapstyle.ts:
|
|
46
|
+
[mapstyle.ts:46](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L46)
|
|
46
47
|
|
|
47
48
|
## Methods
|
|
48
49
|
|
|
@@ -58,7 +59,23 @@ Get the human-friendly description
|
|
|
58
59
|
|
|
59
60
|
#### Defined in
|
|
60
61
|
|
|
61
|
-
[mapstyle.ts:
|
|
62
|
+
[mapstyle.ts:109](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L109)
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
66
|
+
### getExpandedStyleURL
|
|
67
|
+
|
|
68
|
+
▸ **getExpandedStyleURL**(): `string`
|
|
69
|
+
|
|
70
|
+
Get the style as usable by MapLibre, a string (URL) or a plain style description (StyleSpecification)
|
|
71
|
+
|
|
72
|
+
#### Returns
|
|
73
|
+
|
|
74
|
+
`string`
|
|
75
|
+
|
|
76
|
+
#### Defined in
|
|
77
|
+
|
|
78
|
+
[mapstyle.ts:161](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L161)
|
|
62
79
|
|
|
63
80
|
___
|
|
64
81
|
|
|
@@ -72,7 +89,7 @@ ___
|
|
|
72
89
|
|
|
73
90
|
#### Defined in
|
|
74
91
|
|
|
75
|
-
[mapstyle.ts:
|
|
92
|
+
[mapstyle.ts:86](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L86)
|
|
76
93
|
|
|
77
94
|
___
|
|
78
95
|
|
|
@@ -88,7 +105,7 @@ Get the MapTiler Cloud id
|
|
|
88
105
|
|
|
89
106
|
#### Defined in
|
|
90
107
|
|
|
91
|
-
[mapstyle.ts:
|
|
108
|
+
[mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L102)
|
|
92
109
|
|
|
93
110
|
___
|
|
94
111
|
|
|
@@ -104,7 +121,7 @@ Get the image URL that represent _this_ variant
|
|
|
104
121
|
|
|
105
122
|
#### Defined in
|
|
106
123
|
|
|
107
|
-
[mapstyle.ts:
|
|
124
|
+
[mapstyle.ts:153](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L153)
|
|
108
125
|
|
|
109
126
|
___
|
|
110
127
|
|
|
@@ -120,7 +137,7 @@ Get the human-friendly name
|
|
|
120
137
|
|
|
121
138
|
#### Defined in
|
|
122
139
|
|
|
123
|
-
[mapstyle.ts:
|
|
140
|
+
[mapstyle.ts:82](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L82)
|
|
124
141
|
|
|
125
142
|
___
|
|
126
143
|
|
|
@@ -136,7 +153,7 @@ Get the reference style this variant belongs to
|
|
|
136
153
|
|
|
137
154
|
#### Defined in
|
|
138
155
|
|
|
139
|
-
[mapstyle.ts:
|
|
156
|
+
[mapstyle.ts:117](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L117)
|
|
140
157
|
|
|
141
158
|
___
|
|
142
159
|
|
|
@@ -152,7 +169,7 @@ Get the variant type (eg. "DEFAULT", "DARK", "PASTEL", etc.)
|
|
|
152
169
|
|
|
153
170
|
#### Defined in
|
|
154
171
|
|
|
155
|
-
[mapstyle.ts:
|
|
172
|
+
[mapstyle.ts:94](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L94)
|
|
156
173
|
|
|
157
174
|
___
|
|
158
175
|
|
|
@@ -175,7 +192,7 @@ Retrieve the variant of a given type. If not found, will return the "DEFAULT" va
|
|
|
175
192
|
|
|
176
193
|
#### Defined in
|
|
177
194
|
|
|
178
|
-
[mapstyle.ts:
|
|
195
|
+
[mapstyle.ts:137](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L137)
|
|
179
196
|
|
|
180
197
|
___
|
|
181
198
|
|
|
@@ -191,7 +208,7 @@ Get all the variants for _this_ variants, except _this_ current one
|
|
|
191
208
|
|
|
192
209
|
#### Defined in
|
|
193
210
|
|
|
194
|
-
[mapstyle.ts:
|
|
211
|
+
[mapstyle.ts:145](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L145)
|
|
195
212
|
|
|
196
213
|
___
|
|
197
214
|
|
|
@@ -214,4 +231,4 @@ Check if a variant of a given type exists for _this_ variants
|
|
|
214
231
|
|
|
215
232
|
#### Defined in
|
|
216
233
|
|
|
217
|
-
[mapstyle.ts:
|
|
234
|
+
[mapstyle.ts:127](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L127)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.1.
|
|
1
|
+
[MapTiler Client - v1.1.2](../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:
|
|
38
|
+
[mapstyle.ts:180](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
60
|
+
[mapstyle.ts:212](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
76
|
+
[mapstyle.ts:250](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
92
|
+
[mapstyle.ts:204](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
108
|
+
[mapstyle.ts:196](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
131
|
+
[mapstyle.ts:232](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
147
|
+
[mapstyle.ts:242](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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:
|
|
169
|
+
[mapstyle.ts:222](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/mapstyle.ts#L222)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client - v1.1.
|
|
1
|
+
[MapTiler Client - v1.1.2](../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/ec0b213/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/ec0b213/src/services/ServiceError.ts#L5)
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
console.log(LanguageGeocoding);
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
// The API key must be in the URL param as `?key=ABCD1234`
|
|
30
|
+
config.apiKey = (new URLSearchParams(location.search)).get("key");
|
|
30
31
|
|
|
31
32
|
async function testGeocoding() {
|
|
32
33
|
console.log(await geocoding.forward('bordeaux', {language: [geocoding.language.SPANISH, geocoding.language.ENGLISH]}));
|