@maptiler/client 1.1.1 → 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.
Files changed (59) hide show
  1. package/dist/maptiler-client.umd.js +1 -1
  2. package/dist/maptiler-client.umd.min.js +1 -1
  3. package/docs/classes/config.ClientConfig.html +9 -9
  4. package/docs/classes/services_ServiceError.ServiceError.html +7 -7
  5. package/docs/functions/language.getAutoLanguageGeocoding.html +5 -5
  6. package/docs/functions/services_simplify.default.html +5 -5
  7. package/docs/index.html +4 -4
  8. package/docs/modules/config.html +5 -5
  9. package/docs/modules/language.html +5 -5
  10. package/docs/modules/services_ServiceError.html +5 -5
  11. package/docs/modules/services_coordinates.html +5 -5
  12. package/docs/modules/services_data.html +5 -5
  13. package/docs/modules/services_geocoding.html +5 -5
  14. package/docs/modules/services_geolocation.html +5 -5
  15. package/docs/modules/services_simplify.html +5 -5
  16. package/docs/modules/services_staticMaps.html +5 -5
  17. package/docs/modules.html +4 -4
  18. package/docs/types/config.FetchFunction.html +5 -5
  19. package/docs/types/language.LanguageGeocodingString.html +5 -5
  20. package/docs/types/services_coordinates.CoordinateExport.html +5 -5
  21. package/docs/types/services_coordinates.CoordinateGrid.html +5 -5
  22. package/docs/types/services_coordinates.CoordinateId.html +5 -5
  23. package/docs/types/services_coordinates.CoordinateSearch.html +5 -5
  24. package/docs/types/services_coordinates.CoordinateSearchResult.html +5 -5
  25. package/docs/types/services_coordinates.CoordinateTransformResult.html +5 -5
  26. package/docs/types/services_coordinates.CoordinateTransformation.html +5 -5
  27. package/docs/types/services_coordinates.CoordinatesSearchOptions.html +5 -5
  28. package/docs/types/services_coordinates.CoordinatesTransformOptions.html +5 -5
  29. package/docs/types/services_coordinates.XYZ.html +5 -5
  30. package/docs/types/services_data.GetDataOptions.html +5 -5
  31. package/docs/types/services_geocoding.Coordinates.html +5 -5
  32. package/docs/types/services_geocoding.FeatureHierarchy.html +5 -5
  33. package/docs/types/services_geocoding.GeocodingFeature.html +5 -5
  34. package/docs/types/services_geocoding.GeocodingOptions.html +5 -5
  35. package/docs/types/services_geocoding.GeocodingSearchResult.html +5 -5
  36. package/docs/types/services_geocoding.ReverseGeocodingOptions.html +5 -5
  37. package/docs/types/services_geolocation.GeolocationInfoOptions.html +5 -5
  38. package/docs/types/services_geolocation.GeolocationResult.html +5 -5
  39. package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +5 -5
  40. package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +5 -5
  41. package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +5 -5
  42. package/docs/types/services_staticMaps.StaticMapBaseOptions.html +5 -5
  43. package/docs/types/services_staticMaps.StaticMapMarker.html +5 -5
  44. package/docs/variables/config.config.html +5 -5
  45. package/docs/variables/language.LanguageGeocoding.html +5 -5
  46. package/docs/variables/services_coordinates.coordinates.html +5 -5
  47. package/docs/variables/services_data.data.html +5 -5
  48. package/docs/variables/services_geocoding.geocoding.html +5 -5
  49. package/docs/variables/services_geolocation.geolocation.html +5 -5
  50. package/docs/variables/services_staticMaps.staticMaps.html +5 -5
  51. package/docsmd/README.md +40 -40
  52. package/docsmd/classes/ClientConfig.md +5 -5
  53. package/docsmd/classes/MapStyleVariant.md +13 -13
  54. package/docsmd/classes/ReferenceMapStyle.md +9 -9
  55. package/docsmd/classes/ServiceError.md +3 -3
  56. package/examples/test-browser-es.html +2 -1
  57. package/examples/test-browser-umd.html +17 -16
  58. package/package.json +1 -1
  59. package/rollup.config.js +2 -2
@@ -1,4 +1,4 @@
1
- [MapTiler Client - v1.1.1](../README.md) / MapStyleVariant
1
+ [MapTiler Client - v1.1.2](../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/37740e0/src/mapstyle.ts#L46)
46
+ [mapstyle.ts:46](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L109)
62
+ [mapstyle.ts:109](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L161)
78
+ [mapstyle.ts:161](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L86)
92
+ [mapstyle.ts:86](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L102)
108
+ [mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L153)
124
+ [mapstyle.ts:153](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L82)
140
+ [mapstyle.ts:82](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L117)
156
+ [mapstyle.ts:117](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L94)
172
+ [mapstyle.ts:94](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L137)
195
+ [mapstyle.ts:137](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L145)
211
+ [mapstyle.ts:145](https://github.com/maptiler/maptiler-client-js/blob/ec0b213/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/37740e0/src/mapstyle.ts#L127)
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](../README.md) / ReferenceMapStyle
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:180](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L180)
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:212](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L212)
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:250](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L250)
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:204](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L204)
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:196](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L196)
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:232](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L232)
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:242](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L242)
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:222](https://github.com/maptiler/maptiler-client-js/blob/37740e0/src/mapstyle.ts#L222)
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](../README.md) / ServiceError
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/37740e0/src/services/ServiceError.ts#L5)
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/37740e0/src/services/ServiceError.ts#L5)
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
- config.apiKey = 'YOUR_API_KEY';
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]}));
@@ -15,33 +15,34 @@
15
15
  <script src ="../dist/maptiler-client.umd.js"></script>
16
16
 
17
17
  <script>
18
- maptilerclient.config.apiKey = 'YOUR_API_KEY';
18
+ // The API key must be in the URL param as `?key=ABCD1234`
19
+ maptilerClient.config.apiKey = (new URLSearchParams(location.search)).get("key");
19
20
 
20
21
  async function testGeocoding() {
21
- console.log(await maptilerclient.geocoding.forward('bordeaux', {language: [maptilerclient.LanguageGeocoding.SPANISH, maptilerclient.LanguageGeocoding.ENGLISH]}));
22
- console.log(await maptilerclient.geocoding.forward('bordeaux'));
23
- console.log(await maptilerclient.geocoding.reverse([6.249638, 46.402056], {language: ['es', 'en']}));
22
+ console.log(await maptilerClient.geocoding.forward('bordeaux', {language: [maptilerClient.LanguageGeocoding.SPANISH, maptilerClient.LanguageGeocoding.ENGLISH]}));
23
+ console.log(await maptilerClient.geocoding.forward('bordeaux'));
24
+ console.log(await maptilerClient.geocoding.reverse([6.249638, 46.402056], {language: ['es', 'en']}));
24
25
  }
25
26
 
26
27
  async function testGeolocation() {
27
- console.log(await maptilerclient.geolocation.info());
28
+ console.log(await maptilerClient.geolocation.info());
28
29
  }
29
30
 
30
31
  async function testCoordinates() {
31
32
  // searching
32
- console.log(await maptilerclient.coordinates.search('mercator', {transformations: true}));
33
- console.log(await maptilerclient.coordinates.search('plate carree'));
34
- console.log(await maptilerclient.coordinates.search('france'));
35
- console.log(await maptilerclient.coordinates.search('4326', {transformations: true}));
36
- console.log(await maptilerclient.coordinates.search('4326'));
33
+ console.log(await maptilerClient.coordinates.search('mercator', {transformations: true}));
34
+ console.log(await maptilerClient.coordinates.search('plate carree'));
35
+ console.log(await maptilerClient.coordinates.search('france'));
36
+ console.log(await maptilerClient.coordinates.search('4326', {transformations: true}));
37
+ console.log(await maptilerClient.coordinates.search('4326'));
37
38
 
38
39
  // // Transforming from wgs84 (default) to lambert93
39
- console.log(await maptilerclient.coordinates.transform([1, 45], {targetCrs: 9793}));
40
- console.log(await maptilerclient.coordinates.transform([[10, 48], [1, 45]], {targetCrs: 9793}));
40
+ console.log(await maptilerClient.coordinates.transform([1, 45], {targetCrs: 9793}));
41
+ console.log(await maptilerClient.coordinates.transform([[10, 48], [1, 45]], {targetCrs: 9793}));
41
42
  }
42
43
 
43
44
  async function testData() {
44
- console.log(await maptilerclient.data.get('2dd5ecc4-3ae1-4d1e-99a2-182256486357'));
45
+ console.log(await maptilerClient.data.get('2dd5ecc4-3ae1-4d1e-99a2-182256486357'));
45
46
  }
46
47
 
47
48
  function addImage(url) {
@@ -51,7 +52,7 @@
51
52
  }
52
53
 
53
54
  function staticMapTest() {
54
- const imageLinkCentered = maptilerclient.staticMaps.centered([7, 46.8], 5, {
55
+ const imageLinkCentered = maptilerClient.staticMaps.centered([7, 46.8], 5, {
55
56
  hiDPI: true,
56
57
  width: 1000,
57
58
  height: 500,
@@ -62,11 +63,11 @@
62
63
 
63
64
  addImage(imageLinkCentered);
64
65
 
65
- const imageLinkBounded = maptilerclient.staticMaps.bounded([-9.8905, 36.6274, -6.0453, 42.3208], {
66
+ const imageLinkBounded = maptilerClient.staticMaps.bounded([-9.8905, 36.6274, -6.0453, 42.3208], {
66
67
  hiDPI: true,
67
68
  width: 1024,
68
69
  height: 2048,
69
- style: maptilerclient.MapStyle.STAGE.DARK,
70
+ style: maptilerClient.MapStyle.STAGE.DARK,
70
71
  path: [[-9.8905, 36.6274], [-9.8905, 42.3208], [-6.0453, 42.3208], [-6.0453, 36.6274], [-9.8905, 36.6274]],
71
72
  pathStrokeColor: 'red',
72
73
  pathWidth: 4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/client",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Javascript & Typescript wrapper to MapTiler Cloud API",
5
5
  "module": "dist/maptiler-client.mjs",
6
6
  "types": "dist/maptiler-client.d.ts",
package/rollup.config.js CHANGED
@@ -62,7 +62,7 @@ const bundles = [
62
62
  ],
63
63
  output: [
64
64
  {
65
- name: "maptilerclient",
65
+ name: "maptilerClient",
66
66
  file: `dist/${name}.umd.js`,
67
67
  format: "umd",
68
68
  sourcemap: true
@@ -121,7 +121,7 @@ if (process.env.NODE_ENV === "production") {
121
121
  ],
122
122
  output: [
123
123
  {
124
- name: "maptilerclient",
124
+ name: "maptilerClient",
125
125
  file: `dist/${name}.umd.min.js`,
126
126
  format: "umd",
127
127
  sourcemap: false