@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.
Files changed (69) hide show
  1. package/dist/maptiler-client.cjs +122 -1
  2. package/dist/maptiler-client.cjs.map +1 -1
  3. package/dist/maptiler-client.d.ts +12 -2
  4. package/dist/maptiler-client.min.mjs +1 -1
  5. package/dist/maptiler-client.mjs +122 -1
  6. package/dist/maptiler-client.mjs.map +1 -1
  7. package/dist/maptiler-client.umd.js +123 -2
  8. package/dist/maptiler-client.umd.js.map +1 -1
  9. package/dist/maptiler-client.umd.min.js +1 -1
  10. package/docs/classes/config.ClientConfig.html +9 -9
  11. package/docs/classes/services_ServiceError.ServiceError.html +7 -7
  12. package/docs/functions/language.getAutoLanguageGeocoding.html +5 -5
  13. package/docs/functions/services_simplify.default.html +5 -5
  14. package/docs/index.html +28 -35
  15. package/docs/modules/config.html +5 -5
  16. package/docs/modules/language.html +5 -5
  17. package/docs/modules/services_ServiceError.html +5 -5
  18. package/docs/modules/services_coordinates.html +5 -5
  19. package/docs/modules/services_data.html +5 -5
  20. package/docs/modules/services_geocoding.html +5 -5
  21. package/docs/modules/services_geolocation.html +5 -5
  22. package/docs/modules/services_simplify.html +5 -5
  23. package/docs/modules/services_staticMaps.html +5 -5
  24. package/docs/modules.html +4 -4
  25. package/docs/types/config.FetchFunction.html +5 -5
  26. package/docs/types/language.LanguageGeocodingString.html +5 -5
  27. package/docs/types/services_coordinates.CoordinateExport.html +5 -5
  28. package/docs/types/services_coordinates.CoordinateGrid.html +5 -5
  29. package/docs/types/services_coordinates.CoordinateId.html +5 -5
  30. package/docs/types/services_coordinates.CoordinateSearch.html +5 -5
  31. package/docs/types/services_coordinates.CoordinateSearchResult.html +5 -5
  32. package/docs/types/services_coordinates.CoordinateTransformResult.html +5 -5
  33. package/docs/types/services_coordinates.CoordinateTransformation.html +5 -5
  34. package/docs/types/services_coordinates.CoordinatesSearchOptions.html +5 -5
  35. package/docs/types/services_coordinates.CoordinatesTransformOptions.html +5 -5
  36. package/docs/types/services_coordinates.XYZ.html +5 -5
  37. package/docs/types/services_data.GetDataOptions.html +5 -5
  38. package/docs/types/services_geocoding.Coordinates.html +5 -5
  39. package/docs/types/services_geocoding.FeatureHierarchy.html +5 -5
  40. package/docs/types/services_geocoding.GeocodingFeature.html +5 -5
  41. package/docs/types/services_geocoding.GeocodingOptions.html +5 -5
  42. package/docs/types/services_geocoding.GeocodingSearchResult.html +5 -5
  43. package/docs/types/services_geocoding.ReverseGeocodingOptions.html +5 -5
  44. package/docs/types/services_geolocation.GeolocationInfoOptions.html +5 -5
  45. package/docs/types/services_geolocation.GeolocationResult.html +5 -5
  46. package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +5 -5
  47. package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +5 -5
  48. package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +5 -5
  49. package/docs/types/services_staticMaps.StaticMapBaseOptions.html +5 -5
  50. package/docs/types/services_staticMaps.StaticMapMarker.html +5 -5
  51. package/docs/variables/config.config.html +5 -5
  52. package/docs/variables/language.LanguageGeocoding.html +5 -5
  53. package/docs/variables/services_coordinates.coordinates.html +5 -5
  54. package/docs/variables/services_data.data.html +5 -5
  55. package/docs/variables/services_geocoding.geocoding.html +5 -5
  56. package/docs/variables/services_geolocation.geolocation.html +5 -5
  57. package/docs/variables/services_staticMaps.staticMaps.html +5 -5
  58. package/docsmd/README.md +46 -44
  59. package/docsmd/classes/ClientConfig.md +5 -5
  60. package/docsmd/classes/MapStyleVariant.md +29 -12
  61. package/docsmd/classes/ReferenceMapStyle.md +9 -9
  62. package/docsmd/classes/ServiceError.md +3 -3
  63. package/examples/test-browser-es.html +2 -1
  64. package/examples/test-browser-umd.html +17 -16
  65. package/package.json +1 -1
  66. package/readme.md +28 -28
  67. package/rollup.config.js +2 -2
  68. package/src/index.ts +2 -2
  69. package/src/mapstyle.ts +33 -0
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ClientConfig | MapTiler Client - v1.1.0</title><meta name="description" content="Documentation for MapTiler Client - v1.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ClientConfig | MapTiler Client - v1.1.2</title><meta name="description" content="Documentation for MapTiler Client - v1.1.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,13 +6,13 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
14
  <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">MapTiler Client - v1.1.0</a></li>
15
+ <li><a href="../modules.html">MapTiler Client - v1.1.2</a></li>
16
16
  <li><a href="../modules/config.html">config</a></li>
17
17
  <li><a href="config.ClientConfig.html">ClientConfig</a></li></ul>
18
18
  <h1>Class ClientConfig</h1></div>
@@ -24,7 +24,7 @@
24
24
  <ul class="tsd-hierarchy">
25
25
  <li><span class="target">ClientConfig</span></li></ul></section><aside class="tsd-sources">
26
26
  <ul>
27
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L19">config.ts:19</a></li></ul></aside>
27
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L19">config.ts:19</a></li></ul></aside>
28
28
  <section class="tsd-panel-group tsd-index-group">
29
29
  <section class="tsd-panel tsd-index-panel">
30
30
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -58,7 +58,7 @@
58
58
  </div>
59
59
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
60
60
  <ul>
61
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L41">config.ts:41</a></li></ul></aside></li>
61
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L41">config.ts:41</a></li></ul></aside></li>
62
62
  <li class="tsd-signature" id="apiKey.apiKey-2"><span class="tsd-signature-symbol">set</span> apiKey<span class="tsd-signature-symbol">(</span>k<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
63
63
  <li class="tsd-description">
64
64
  <div class="tsd-comment tsd-typography"><p>Set the MapTiler Cloud API key</p>
@@ -70,7 +70,7 @@
70
70
  <h5>k: <span class="tsd-signature-type">string</span></h5></li></ul></div>
71
71
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
72
72
  <ul>
73
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L34">config.ts:34</a></li></ul></aside></li></ul></section>
73
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L34">config.ts:34</a></li></ul></aside></li></ul></section>
74
74
  <section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="fetch" class="tsd-anchor"></a>
75
75
  <h3 class="tsd-anchor-link"><span>fetch</span><a href="#fetch" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
76
76
  <ul class="tsd-signatures tsd-kind-accessor tsd-parent-kind-class">
@@ -80,7 +80,7 @@
80
80
  </div>
81
81
  <h4 class="tsd-returns-title">Returns <a href="../types/config.FetchFunction.html" class="tsd-signature-type" data-tsd-kind="Type alias">FetchFunction</a></h4><aside class="tsd-sources">
82
82
  <ul>
83
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L55">config.ts:55</a></li></ul></aside></li>
83
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L55">config.ts:55</a></li></ul></aside></li>
84
84
  <li class="tsd-signature" id="fetch.fetch-2"><span class="tsd-signature-symbol">set</span> fetch<span class="tsd-signature-symbol">(</span>f<span class="tsd-signature-symbol">: </span><a href="../types/config.FetchFunction.html" class="tsd-signature-type" data-tsd-kind="Type alias">FetchFunction</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
85
85
  <li class="tsd-description">
86
86
  <div class="tsd-comment tsd-typography"><p>Set a the custom fetch function to replace the default one</p>
@@ -92,7 +92,7 @@
92
92
  <h5>f: <a href="../types/config.FetchFunction.html" class="tsd-signature-type" data-tsd-kind="Type alias">FetchFunction</a></h5></li></ul></div>
93
93
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
94
94
  <ul>
95
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L48">config.ts:48</a></li></ul></aside></li></ul></section></section></div>
95
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/config.ts#L48">config.ts:48</a></li></ul></aside></li></ul></section></section></div>
96
96
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
97
97
  <div class="tsd-navigation settings">
98
98
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -109,7 +109,7 @@
109
109
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
110
110
  <div class="tsd-accordion-details">
111
111
  <ul>
112
- <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.0</a>
112
+ <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.2</a>
113
113
  <ul>
114
114
  <li class="current tsd-kind-module"><a href="../modules/config.html">config</a></li>
115
115
  <li class="tsd-kind-module"><a href="../modules/language.html">language</a></li>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ServiceError | MapTiler Client - v1.1.0</title><meta name="description" content="Documentation for MapTiler Client - v1.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ServiceError | MapTiler Client - v1.1.2</title><meta name="description" content="Documentation for MapTiler Client - v1.1.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,13 +6,13 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
14
  <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">MapTiler Client - v1.1.0</a></li>
15
+ <li><a href="../modules.html">MapTiler Client - v1.1.2</a></li>
16
16
  <li><a href="../modules/services_ServiceError.html">services/ServiceError</a></li>
17
17
  <li><a href="services_ServiceError.ServiceError.html">ServiceError</a></li></ul>
18
18
  <h1>Class ServiceError</h1></div>
@@ -26,7 +26,7 @@
26
26
  <ul class="tsd-hierarchy">
27
27
  <li><span class="target">ServiceError</span></li></ul></li></ul></section><aside class="tsd-sources">
28
28
  <ul>
29
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/ServiceError.ts#L4">services/ServiceError.ts:4</a></li></ul></aside>
29
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/ServiceError.ts#L4">services/ServiceError.ts:4</a></li></ul></aside>
30
30
  <section class="tsd-panel-group tsd-index-group">
31
31
  <section class="tsd-panel tsd-index-panel">
32
32
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -57,14 +57,14 @@
57
57
  <h4 class="tsd-returns-title">Returns <a href="services_ServiceError.ServiceError.html" class="tsd-signature-type" data-tsd-kind="Class">ServiceError</a></h4><aside class="tsd-sources">
58
58
  <p>Overrides Error.constructor</p>
59
59
  <ul>
60
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/ServiceError.ts#L5">services/ServiceError.ts:5</a></li></ul></aside></li></ul></section></section>
60
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/ServiceError.ts#L5">services/ServiceError.ts:5</a></li></ul></aside></li></ul></section></section>
61
61
  <section class="tsd-panel-group tsd-member-group">
62
62
  <h2>Properties</h2>
63
63
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="res" class="tsd-anchor"></a>
64
64
  <h3 class="tsd-anchor-link"><span>res</span><a href="#res" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
65
65
  <div class="tsd-signature">res<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Response</span></div><aside class="tsd-sources">
66
66
  <ul>
67
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/ServiceError.ts#L5">services/ServiceError.ts:5</a></li></ul></aside></section></section></div>
67
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/ServiceError.ts#L5">services/ServiceError.ts:5</a></li></ul></aside></section></section></div>
68
68
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
69
69
  <div class="tsd-navigation settings">
70
70
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -81,7 +81,7 @@
81
81
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
82
82
  <div class="tsd-accordion-details">
83
83
  <ul>
84
- <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.0</a>
84
+ <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.2</a>
85
85
  <ul>
86
86
  <li class="tsd-kind-module"><a href="../modules/config.html">config</a></li>
87
87
  <li class="tsd-kind-module"><a href="../modules/language.html">language</a></li>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getAutoLanguageGeocoding | MapTiler Client - v1.1.0</title><meta name="description" content="Documentation for MapTiler Client - v1.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getAutoLanguageGeocoding | MapTiler Client - v1.1.2</title><meta name="description" content="Documentation for MapTiler Client - v1.1.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,13 +6,13 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
14
  <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">MapTiler Client - v1.1.0</a></li>
15
+ <li><a href="../modules.html">MapTiler Client - v1.1.2</a></li>
16
16
  <li><a href="../modules/language.html">language</a></li>
17
17
  <li><a href="language.getAutoLanguageGeocoding.html">getAutoLanguageGeocoding</a></li></ul>
18
18
  <h1>Function getAutoLanguageGeocoding</h1></div>
@@ -22,7 +22,7 @@
22
22
  <li class="tsd-description">
23
23
  <h4 class="tsd-returns-title">Returns <a href="../types/language.LanguageGeocodingString.html" class="tsd-signature-type" data-tsd-kind="Type alias">LanguageGeocodingString</a></h4><aside class="tsd-sources">
24
24
  <ul>
25
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/language.ts#L71">language.ts:71</a></li></ul></aside></li></ul></section></div>
25
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/language.ts#L71">language.ts:71</a></li></ul></aside></li></ul></section></div>
26
26
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
27
27
  <div class="tsd-navigation settings">
28
28
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -39,7 +39,7 @@
39
39
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
40
40
  <div class="tsd-accordion-details">
41
41
  <ul>
42
- <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.0</a>
42
+ <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.2</a>
43
43
  <ul>
44
44
  <li class="tsd-kind-module"><a href="../modules/config.html">config</a></li>
45
45
  <li class="current tsd-kind-module"><a href="../modules/language.html">language</a></li>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | MapTiler Client - v1.1.0</title><meta name="description" content="Documentation for MapTiler Client - v1.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | MapTiler Client - v1.1.2</title><meta name="description" content="Documentation for MapTiler Client - v1.1.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,13 +6,13 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">MapTiler Client - v1.1.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
14
  <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">MapTiler Client - v1.1.0</a></li>
15
+ <li><a href="../modules.html">MapTiler Client - v1.1.2</a></li>
16
16
  <li><a href="../modules/services_simplify.html">services/simplify</a></li>
17
17
  <li><a href="services_simplify.default.html">default</a></li></ul>
18
18
  <h1>Function default</h1></div>
@@ -29,7 +29,7 @@
29
29
  <h5>tolerance: <span class="tsd-signature-type">number</span></h5></li></ul></div>
30
30
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Position</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
31
31
  <ul>
32
- <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/simplify.ts#L76">services/simplify.ts:76</a></li></ul></aside></li></ul></section></div>
32
+ <li>Defined in <a href="https://github.com/maptiler/maptiler-client-js/blob/ec0b213/src/services/simplify.ts#L76">services/simplify.ts:76</a></li></ul></aside></li></ul></section></div>
33
33
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
34
34
  <div class="tsd-navigation settings">
35
35
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -46,7 +46,7 @@
46
46
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
47
47
  <div class="tsd-accordion-details">
48
48
  <ul>
49
- <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.0</a>
49
+ <li class="current"><a href="../modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.2</a>
50
50
  <ul>
51
51
  <li class="tsd-kind-module"><a href="../modules/config.html">config</a></li>
52
52
  <li class="tsd-kind-module"><a href="../modules/language.html">language</a></li>
package/docs/index.html CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MapTiler Client - v1.1.0</title><meta name="description" content="Documentation for MapTiler Client - v1.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><link rel="stylesheet" href="assets/custom.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MapTiler Client - v1.1.2</title><meta name="description" content="Documentation for MapTiler Client - v1.1.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><link rel="stylesheet" href="assets/custom.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base=".">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,14 +6,14 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">MapTiler Client - v1.1.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">MapTiler Client - v1.1.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
- <h2>MapTiler Client - v1.1.0</h2></div>
14
+ <h2>MapTiler Client - v1.1.2</h2></div>
15
15
  <div class="tsd-panel tsd-typography"><p align="center">
16
- <a href="https://www.maptiler.com/">offcial page →</a><br>
16
+ <a href="https://docs.maptiler.com/client-js/">offcial page →</a><br>
17
17
  <img src="images/maptiler-client-logo.svg" width="400px">
18
18
  </p>
19
19
 
@@ -38,11 +38,11 @@
38
38
  </a>
39
39
  <p>The <strong>MapTiler Client JS</strong> exposes a number of handy functions that wrap API call to <a href="https://docs.maptiler.com/cloud/api">MapTiler Cloud API services</a>, such as:</p>
40
40
  <ul>
41
- <li>Geocoding forward and reverse</li>
42
- <li>Geolocation from visitor&#39;s IP address</li>
43
- <li>Coordidinate systems search and tranform</li>
44
- <li>User data fetching as GeoJSON</li>
45
- <li>Static maps of all sorts</li>
41
+ <li><a href="#-geocoding">Geocoding forward and reverse</a></li>
42
+ <li><a href="#%EF%B8%8F%EF%B8%8F-geolocation">Geolocation from visitor&#39;s IP address</a></li>
43
+ <li><a href="#-coordinates">Coordidinate systems search and tranform</a></li>
44
+ <li><a href="#-data">User data fetching as GeoJSON</a></li>
45
+ <li><a href="#%EF%B8%8F-static-maps">Static maps of all sorts</a></li>
46
46
  </ul>
47
47
 
48
48
  <a href="#why" id="why" style="color: inherit; text-decoration: none;">
@@ -60,9 +60,6 @@
60
60
  <li>Runs: in Node.js or in browser</li>
61
61
  <li>Open source license</li>
62
62
  </ul>
63
- <blockquote>
64
- <p>📣 <em><strong>Note:</strong></em> If you need <em>this</em> API wrapper <strong>AND</strong> a complete SDK to display beautiful interactive maps, then checkout <a href="https://github.com/maptiler/maptiler-sdk-js">MapTiler SDK JS</a>, it contains it all!</p>
65
- </blockquote>
66
63
 
67
64
  <a href="#install" id="install" style="color: inherit; text-decoration: none;">
68
65
  <h1>Install</h1>
@@ -91,7 +88,7 @@
91
88
  <h2>🔍 Geocoding</h2>
92
89
  </a>
93
90
  <blockquote>
94
- <p>✅ Please, use geocoding responses in the context of server-side rendering, hydration or client-side rendering, but do not 🚫 store or redistribute MapTiler Cloud API data. In case of doubt, consult the <a href="https://www.maptiler.com/cloud/terms/#explicitly-prohibited-use">terms</a> ⚖️</p>
91
+ <p>✅ Please, use geocoding functions only from client-side (browser) and do not 🚫 <strong>store</strong> or <strong>redistribute</strong> MapTiler Cloud API data. In case of doubt, consult the <a href="https://www.maptiler.com/cloud/terms/#explicitly-prohibited-use">terms</a> ⚖️</p>
95
92
  </blockquote>
96
93
 
97
94
  <a href="#forward" id="forward" style="color: inherit; text-decoration: none;">
@@ -106,7 +103,7 @@
106
103
  <li>one of more languages to get the results into</li>
107
104
  <li>a bounding geo box, to restrict the search to a given window</li>
108
105
  </ul>
109
- <p>Read more about forward geocoding on our official <a href="https://docs.maptiler.com/cloud/api/geocoding/#search-by-name-forward">API documentation</a>.</p>
106
+ <p>Read more about forward geocoding on our <a href="https://docs.maptiler.com/client-js/geocoding/#forward">official documentation</a>.</p>
110
107
 
111
108
  <a href="#reverse" id="reverse" style="color: inherit; text-decoration: none;">
112
109
  <h3>Reverse</h3>
@@ -115,7 +112,7 @@
115
112
  <pre><code class="language-ts"><span class="hl-2">// in an async function, or as a &#39;thenable&#39;:</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">result</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">geocoding</span><span class="hl-0">.</span><span class="hl-7">reverse</span><span class="hl-0">([</span><span class="hl-8">6.249638</span><span class="hl-0">, </span><span class="hl-8">46.402056</span><span class="hl-0">]);</span>
116
113
  </code></pre>
117
114
  <p>The same option object as the forward geocoding can be provided.</p>
118
- <p>Read more about reverse geocoding on our official <a href="https://docs.maptiler.com/cloud/api/geocoding/#search-by-coordinates-reverse">API documentation</a>.</p>
115
+ <p>Read more about reverse geocoding on our <a href="https://docs.maptiler.com/client-js/geocoding/#reverse">official documentation</a>.</p>
119
116
 
120
117
  <a href="#language" id="language" style="color: inherit; text-decoration: none;">
121
118
  <h3>Language</h3>
@@ -123,26 +120,21 @@
123
120
  <p>For both <em>forward</em> and <em>reverse</em> geocoding, this library provides a list of supported languages as shorthands to <a href="https://en.wikipedia.org/wiki/ISO_639-1">ISO language codes</a>. The result will be provided in multiple languages if the <code>language</code> options is an array:</p>
124
121
  <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">result</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">geocoding</span><span class="hl-0">.</span><span class="hl-7">forward</span><span class="hl-0">(</span><span class="hl-1">&#39;paris&#39;</span><span class="hl-0">, {</span><span class="hl-5">language:</span><span class="hl-0"> [</span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">geocoding</span><span class="hl-0">.</span><span class="hl-5">languages</span><span class="hl-0">.</span><span class="hl-6">SPANISH</span><span class="hl-0">, </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">geocoding</span><span class="hl-0">.</span><span class="hl-5">languages</span><span class="hl-0">.</span><span class="hl-6">KOREAN</span><span class="hl-0">]})</span>
125
122
  </code></pre>
126
- <p>The special language <code>AUTO</code> will detect the plateform/browser prefered language.</p>
123
+ <p>The special language <code>AUTO</code> will detect the platform/browser preferred language.</p>
127
124
 
128
125
  <a href="#🕵️♂️-geolocation" id="🕵️♂️-geolocation" style="color: inherit; text-decoration: none;">
129
126
  <h2>🕵️‍♂️ Geolocation</h2>
130
127
  </a>
131
- <blockquote>
132
- <p>✅ Please, use geolocation responses in the context of server-side rendering, hydration or client-side rendering, but do not 🚫 store or redistribute MapTiler Cloud API data. In case of doubt, consult the <a href="https://www.maptiler.com/cloud/terms/#explicitly-prohibited-use">terms</a> ⚖️</p>
133
- </blockquote>
134
- <p>The geolocation service provides an accurate location insight of a website visitor using its IP address.</p>
128
+ <p>The geolocation service provides location informations of a visitor using its IP address.</p>
129
+ <p>The geolocation uses the IP address of a visitors to provide informations about their location, such as city, region, country, timezone, etc. The precision is lower than GPS but does not require visitors to explicitely enable the location service from their web browser.</p>
135
130
  <p>There is only a single function:</p>
136
131
  <pre><code class="language-ts"><span class="hl-2">// in an async function, or as a &#39;thenable&#39;:</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">result</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">geolocation</span><span class="hl-0">.</span><span class="hl-7">info</span><span class="hl-0">();</span>
137
132
  </code></pre>
138
- <p>Read more about geolocation on our official <a href="https://docs.maptiler.com/cloud/api/geolocation/">API documentation</a>.</p>
133
+ <p>Read more about geolocation on our <a href="https://docs.maptiler.com/client-js/geolocation/">official documentation</a>.</p>
139
134
 
140
135
  <a href="#🌐-coordinates" id="🌐-coordinates" style="color: inherit; text-decoration: none;">
141
136
  <h2>🌐 Coordinates</h2>
142
137
  </a>
143
- <blockquote>
144
- <p>✅ Please, use coordinate responses in the context of server-side rendering, hydration or client-side rendering, but do not 🚫 store or redistribute MapTiler Cloud API data. In case of doubt, consult the <a href="https://www.maptiler.com/cloud/terms/#explicitly-prohibited-use">terms</a> ⚖️</p>
145
- </blockquote>
146
138
  <p>If you are already familiar with <a href="https://epsg.io/">epsg.io</a> (created by MapTiler), then you may find convenient to access the details of more than 10 thousands of coordinate reference systems (CRS) programmatically, as well as transforming coordinates from one system to another!</p>
147
139
 
148
140
  <a href="#search" id="search" style="color: inherit; text-decoration: none;">
@@ -152,7 +144,7 @@
152
144
  <pre><code class="language-ts"><span class="hl-2">// in an async function, or as a &#39;thenable&#39;:</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultA</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">search</span><span class="hl-0">(</span><span class="hl-1">&#39;mercator&#39;</span><span class="hl-0">);</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultB</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">search</span><span class="hl-0">(</span><span class="hl-1">&#39;plate carree&#39;</span><span class="hl-0">);</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultC</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">search</span><span class="hl-0">(</span><span class="hl-1">&#39;france&#39;</span><span class="hl-0">);</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultD</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">search</span><span class="hl-0">(</span><span class="hl-1">&#39;code:4326&#39;</span><span class="hl-0">, {</span><span class="hl-5">transformations:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">}));</span>
153
145
  </code></pre>
154
146
  <p>The <code>transformations</code> options retrieves a lot more details about the CRS that MapTiler API is able to transform to/from than just their IDs.</p>
155
- <p>Read more about searching coordinate systems on our official <a href="https://docs.maptiler.com/cloud/api/coordinates/#search-coordinate-systems">API documentation</a>.</p>
147
+ <p>Read more about searching coordinate systems on our <a href="https://docs.maptiler.com/client-js/coordinates/#search">official documentation</a>.</p>
156
148
 
157
149
  <a href="#transform" id="transform" style="color: inherit; text-decoration: none;">
158
150
  <h3>Transform</h3>
@@ -161,7 +153,7 @@
161
153
  <p>If not provided, both the source (<code>sourceCrs</code>) and the destination (<code>targetCrs</code>) are default to <strong>EPSG:4326</strong> (in other words, <a href="https://epsg.io/4326">WGS84</a>). Here is how to use this feature:</p>
162
154
  <pre><code class="language-ts"><span class="hl-2">// in an async function, or as a &#39;thenable&#39;:</span><br/><br/><span class="hl-2">// Providing one coordinate to transform, with a target CRS being EPSG:9793 (RGF93 v2 / Lambert-93, France official CRS)</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultA</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">transform</span><span class="hl-0">([</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">45</span><span class="hl-0">], {</span><span class="hl-5">targetCrs:</span><span class="hl-0"> </span><span class="hl-8">9793</span><span class="hl-0">})</span><br/><br/><span class="hl-2">// Using the same logic, we can pass up to 50 coordinates to be transformed</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">resultB</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">.</span><span class="hl-7">transform</span><span class="hl-0">([[</span><span class="hl-8">10</span><span class="hl-0">, </span><span class="hl-8">48</span><span class="hl-0">], [</span><span class="hl-8">1</span><span class="hl-0">, </span><span class="hl-8">45</span><span class="hl-0">]], {</span><span class="hl-5">targetCrs:</span><span class="hl-0"> </span><span class="hl-8">9793</span><span class="hl-0">})</span>
163
155
  </code></pre>
164
- <p>Read more about transforming coordinates on our official <a href="https://docs.maptiler.com/cloud/api/coordinates/#transform-coordinates">API documentation</a>.</p>
156
+ <p>Read more about transforming coordinates on our <a href="https://docs.maptiler.com/client-js/coordinates/#transform">official documentation</a>.</p>
165
157
 
166
158
  <a href="#💽-data" id="💽-data" style="color: inherit; text-decoration: none;">
167
159
  <h2>💽 Data</h2>
@@ -170,6 +162,7 @@
170
162
  <pre><code class="language-ts"><span class="hl-2">// in an async function, or as a &#39;thenable&#39;:</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">result</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">data</span><span class="hl-0">.</span><span class="hl-7">get</span><span class="hl-0">(</span><span class="hl-1">&#39;my-dataset-unique-id&#39;</span><span class="hl-0">)</span>
171
163
  </code></pre>
172
164
  <p>Since the result is a GeoJSON, it can easily be added to a <code>map</code> with <code>.addSource()</code> and <code>.addLayer()</code>.</p>
165
+ <p>Read more about fetching your own data on our <a href="https://docs.maptiler.com/client-js/data/">official documentation</a>.</p>
173
166
 
174
167
  <a href="#🗺️-static-maps" id="🗺️-static-maps" style="color: inherit; text-decoration: none;">
175
168
  <h2>🗺️ Static maps</h2>
@@ -185,7 +178,7 @@
185
178
  </ul>
186
179
  <p>Three modes are available: <code>centered</code>, <code>bounded</code> and <code>automatic</code>.</p>
187
180
  <blockquote>
188
- <p>📣 <em><strong>important:</strong></em> Contrary to the geolocation/geocoding/coordinates/data service wrappers, the static maps function <strong>does not</strong> perform any query to the MapTiler API, instead they build the image URL. We took this decision because images are most likely going to be displayed in <code>&lt;img src=&quot;path.png&quot;&gt;&lt;/img&gt;</code> markups and will naturaly be fetched by the web browser.</p>
181
+ <p>📣 <em><strong>important:</strong></em> <span style="text-decoration: underline">only image <strong>URLs</strong> are returned.</span><br>Contrary to the other functions of this library, the static map functions <strong>do not</strong> perform any query to MapTiler Cloud API, instead they build the image URL for you to use in <code>&lt;img&gt;</code> elements.</p>
189
182
  </blockquote>
190
183
 
191
184
  <a href="#map-styles" id="map-styles" style="color: inherit; text-decoration: none;">
@@ -244,7 +237,7 @@
244
237
  <h3>Centered static maps</h3>
245
238
  </a>
246
239
  <p>This type of map is centered on a longitude-latitude coordinate and the zoom level must also be provided (from <code>0</code>: very zoomed out, to <code>22</code>: very zoomed in).<br>Note that if a path or markers are provided, the framing of the map will not automatically adapt to include those (use the <code>automatic</code> mode for that).</p>
247
- <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptiler</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">centered</span><span class="hl-0">(</span><br/><span class="hl-0"> </span><span class="hl-2">// center position (Boston)</span><br/><span class="hl-0"> [-</span><span class="hl-8">71.06080</span><span class="hl-0">, </span><span class="hl-8">42.362114</span><span class="hl-0">], </span><br/><br/><span class="hl-0"> </span><span class="hl-2">// zoom level</span><br/><span class="hl-0"> </span><span class="hl-8">12.5</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><br/><span class="hl-0"> </span><span class="hl-2">// Options</span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">// Request a hiDPI/Retina image</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Output image size</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">1000</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">1000</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Map style</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">OUTDOOR</span><span class="hl-0">,</span><br/><span class="hl-0"> });</span>
240
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">centered</span><span class="hl-0">(</span><br/><span class="hl-0"> </span><span class="hl-2">// center position (Boston)</span><br/><span class="hl-0"> [-</span><span class="hl-8">71.06080</span><span class="hl-0">, </span><span class="hl-8">42.362114</span><span class="hl-0">], </span><br/><br/><span class="hl-0"> </span><span class="hl-2">// zoom level</span><br/><span class="hl-0"> </span><span class="hl-8">12.5</span><span class="hl-0">, </span><br/><span class="hl-0"> </span><br/><span class="hl-0"> </span><span class="hl-2">// Options</span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">// Request a hiDPI/Retina image</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Output image size</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">1000</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">1000</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Map style</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">OUTDOOR</span><span class="hl-0">,</span><br/><span class="hl-0"> });</span>
248
241
  </code></pre>
249
242
  <p>Read more about centered static maps on our official <a href="https://docs.maptiler.com/cloud/api/static-maps/#center-based-image">API documentation</a>.</p>
250
243
 
@@ -252,7 +245,7 @@
252
245
  <h3>Bounded static maps</h3>
253
246
  </a>
254
247
  <p>This type of map requires a bounding box made of two points: the south-west bound and the north-east bound. The zoom level cannot be provided and is automatically deduced from the size of the bounding box.</p>
255
- <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptiler</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">bounded</span><span class="hl-0">(</span><br/><span class="hl-0"> </span><span class="hl-2">// The bounding box on Europe</span><br/><span class="hl-0"> [</span><br/><span class="hl-0"> -</span><span class="hl-8">24</span><span class="hl-0">, </span><span class="hl-2">// west bound (min x)</span><br/><span class="hl-0"> </span><span class="hl-8">34.5</span><span class="hl-0">, </span><span class="hl-2">// south bound (min y)</span><br/><span class="hl-0"> </span><span class="hl-8">32</span><span class="hl-0">, </span><span class="hl-2">// east bound (max x)</span><br/><span class="hl-0"> </span><span class="hl-8">71</span><span class="hl-0">, </span><span class="hl-2">// north bound (max y)</span><br/><span class="hl-0"> ],</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Options</span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">STREETS</span><span class="hl-0">.</span><span class="hl-6">DARK</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Extra space that will add around the bounding box, in percentage</span><br/><span class="hl-0"> </span><span class="hl-2">// (0.1 = 10% is actually the dafault)</span><br/><span class="hl-0"> </span><span class="hl-5">padding:</span><span class="hl-0"> </span><span class="hl-8">0.1</span><br/><span class="hl-0"> });</span>
248
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">bounded</span><span class="hl-0">(</span><br/><span class="hl-0"> </span><span class="hl-2">// The bounding box on Europe</span><br/><span class="hl-0"> [</span><br/><span class="hl-0"> -</span><span class="hl-8">24</span><span class="hl-0">, </span><span class="hl-2">// west bound (min x)</span><br/><span class="hl-0"> </span><span class="hl-8">34.5</span><span class="hl-0">, </span><span class="hl-2">// south bound (min y)</span><br/><span class="hl-0"> </span><span class="hl-8">32</span><span class="hl-0">, </span><span class="hl-2">// east bound (max x)</span><br/><span class="hl-0"> </span><span class="hl-8">71</span><span class="hl-0">, </span><span class="hl-2">// north bound (max y)</span><br/><span class="hl-0"> ],</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Options</span><br/><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">STREETS</span><span class="hl-0">.</span><span class="hl-6">DARK</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Extra space that will add around the bounding box, in percentage</span><br/><span class="hl-0"> </span><span class="hl-2">// (0.1 = 10% is actually the dafault)</span><br/><span class="hl-0"> </span><span class="hl-5">padding:</span><span class="hl-0"> </span><span class="hl-8">0.1</span><br/><span class="hl-0"> });</span>
256
249
  </code></pre>
257
250
  <p>Since the zoom level cannot be provided, the level of details is dictated by the size of the output image. here is an example:</p>
258
251
  <table>
@@ -267,7 +260,7 @@
267
260
  <td align="center"><img src="images/screenshots/static-bounded-europe-1024.png" alt=""></td>
268
261
  </tr>
269
262
  </tbody></table>
270
- <p>As you may notice, the geo bounding box could have very different proportions than the output image size. In the following example, we place the very same bounding box around Portugal, which has a this particular strip looking shape. We also add a <code>path</code> that repeats exactely the same bounding box to show the difference between the provided bounding box and the final image. We kept the default padding of 10%:</p>
263
+ <p>As you may notice, the geo bounding box could have very different proportions than the output image size. In the following example, we place the very same bounding box around Portugal, which has a this particular strip looking shape. We also add a <code>path</code> that repeats exactly the same bounding box to show the difference between the provided bounding box and the final image. We kept the default padding of 10%:</p>
271
264
  <table>
272
265
  <thead>
273
266
  <tr>
@@ -286,13 +279,13 @@
286
279
  <h3>Automatic static maps</h3>
287
280
  </a>
288
281
  <p>As we have seen with centered and bounded maps, providing all the parameters is nice but can be cumbersome for the simplest use cases. This is why MapTiler Cloud also provides static maps that fits automatically whatever you need to place inside: path or markers.</p>
289
- <p>In the following example, we are going to load a cycling track recorded by one of our team members in Montreal, Canada. The track, originally a GPX file, was pushed to MapTiler Data and is now made avalable as a GeoJSON:</p>
290
- <pre><code class="language-ts"><span class="hl-2">// Fetching the GeoJSON</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">bikeTrack</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">data</span><span class="hl-0">.</span><span class="hl-7">get</span><span class="hl-0">(</span><span class="hl-1">&#39;the-id-of-a-bike-track-in-montreal&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-2">// Extracting the track points with the shape [[lng, lat], [lng, lat], ...]</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">trackPoints</span><span class="hl-0"> = </span><span class="hl-5">bikeTrack</span><span class="hl-0">.</span><span class="hl-5">features</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">].</span><span class="hl-5">geometry</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">]</span><br/><span class="hl-0"> .</span><span class="hl-7">map</span><span class="hl-0">(</span><span class="hl-5">p</span><span class="hl-0"> </span><span class="hl-4">=&gt;</span><span class="hl-0"> </span><span class="hl-5">p</span><span class="hl-0">.</span><span class="hl-7">slice</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">));</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptiler</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">automatic</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">// hiDPI/Retina precision</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// A farily large output image</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">1024</span><span class="hl-0"> ,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// A grey style on which the track will pop!</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">STREETS</span><span class="hl-0">.</span><span class="hl-6">LIGHT</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Draw a path with the trackpoints</span><br/><span class="hl-0"> </span><span class="hl-5">path:</span><span class="hl-0"> </span><span class="hl-5">trackPoints</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Adding a marker for the starting point, with a custom color (array of shape [lng, lat, color])</span><br/><span class="hl-0"> </span><span class="hl-5">marker:</span><span class="hl-0"> [</span><span class="hl-5">trackPoints</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">][</span><span class="hl-8">0</span><span class="hl-0">], </span><span class="hl-5">trackPoints</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">][</span><span class="hl-8">1</span><span class="hl-0">], </span><span class="hl-1">&#39;#0a0&#39;</span><span class="hl-0">],</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Showing the track in red</span><br/><span class="hl-0"> </span><span class="hl-5">pathStrokeColor:</span><span class="hl-0"> </span><span class="hl-1">&#39;red&#39;</span><span class="hl-0">,</span><br/><span class="hl-0">});</span>
282
+ <p>In the following example, we are going to load a cycling track recorded by one of our team members in Montreal, Canada. The track, originally a GPX file, was pushed to MapTiler Data and is now made available as a GeoJSON:</p>
283
+ <pre><code class="language-ts"><span class="hl-2">// Fetching the GeoJSON</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">bikeTrack</span><span class="hl-0"> = </span><span class="hl-3">await</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">data</span><span class="hl-0">.</span><span class="hl-7">get</span><span class="hl-0">(</span><span class="hl-1">&#39;the-id-of-a-bike-track-in-montreal&#39;</span><span class="hl-0">);</span><br/><br/><span class="hl-2">// Extracting the track points with the shape [[lng, lat], [lng, lat], ...]</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">trackPoints</span><span class="hl-0"> = </span><span class="hl-5">bikeTrack</span><span class="hl-0">.</span><span class="hl-5">features</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">].</span><span class="hl-5">geometry</span><span class="hl-0">.</span><span class="hl-5">coordinates</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">]</span><br/><span class="hl-0"> .</span><span class="hl-7">map</span><span class="hl-0">(</span><span class="hl-5">p</span><span class="hl-0"> </span><span class="hl-4">=&gt;</span><span class="hl-0"> </span><span class="hl-5">p</span><span class="hl-0">.</span><span class="hl-7">slice</span><span class="hl-0">(</span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-8">2</span><span class="hl-0">));</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-6">imageLink</span><span class="hl-0"> = </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">staticMaps</span><span class="hl-0">.</span><span class="hl-7">automatic</span><span class="hl-0">({</span><br/><span class="hl-0"> </span><span class="hl-2">// hiDPI/Retina precision</span><br/><span class="hl-0"> </span><span class="hl-5">hiDPI:</span><span class="hl-0"> </span><span class="hl-4">true</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// A fairly large output image</span><br/><span class="hl-0"> </span><span class="hl-5">width:</span><span class="hl-0"> </span><span class="hl-8">2048</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-5">height:</span><span class="hl-0"> </span><span class="hl-8">1024</span><span class="hl-0"> ,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// A grey style on which the track will pop!</span><br/><span class="hl-0"> </span><span class="hl-5">style:</span><span class="hl-0"> </span><span class="hl-5">maptilerClient</span><span class="hl-0">.</span><span class="hl-5">MapStyle</span><span class="hl-0">.</span><span class="hl-6">STREETS</span><span class="hl-0">.</span><span class="hl-6">LIGHT</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Draw a path with the trackpoints</span><br/><span class="hl-0"> </span><span class="hl-5">path:</span><span class="hl-0"> </span><span class="hl-5">trackPoints</span><span class="hl-0">,</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Adding a marker for the starting point, with a custom color (array of shape [lng, lat, color])</span><br/><span class="hl-0"> </span><span class="hl-5">marker:</span><span class="hl-0"> [</span><span class="hl-5">trackPoints</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">][</span><span class="hl-8">0</span><span class="hl-0">], </span><span class="hl-5">trackPoints</span><span class="hl-0">[</span><span class="hl-8">0</span><span class="hl-0">][</span><span class="hl-8">1</span><span class="hl-0">], </span><span class="hl-1">&#39;#0a0&#39;</span><span class="hl-0">],</span><br/><br/><span class="hl-0"> </span><span class="hl-2">// Showing the track in red</span><br/><span class="hl-0"> </span><span class="hl-5">pathStrokeColor:</span><span class="hl-0"> </span><span class="hl-1">&#39;red&#39;</span><span class="hl-0">,</span><br/><span class="hl-0">});</span>
291
284
  </code></pre>
292
285
  <p>And voila!</p>
293
286
  <p><img src="images/screenshots/static-with-path.png" alt="static map with bike path"></p>
294
287
  <blockquote>
295
- <p>📣 <em><strong>Note:</strong></em> The GeoJSON for this track contains 9380 couples of coordinates, which is a lot! In order to send the track to MapTiler Cloud static maps API, the client simplifies the long paths while keeing a high degree of precision using a very fast <a href="https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm">Ramer-Douglas-Peucker algorithm</a>.</p>
288
+ <p>📣 <em><strong>Note:</strong></em> The GeoJSON for this track contains 9380 couples of coordinates, which is a lot! In order to send the track to MapTiler Cloud static maps API, the client simplifies the long paths while keeping a high degree of precision using a very fast <a href="https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm">Ramer-Douglas-Peucker algorithm</a>.</p>
296
289
  </blockquote>
297
290
  <p>Read more about bounded static maps on our official <a href="https://docs.maptiler.com/cloud/api/static-maps/#auto-fitted-image">API documentation</a>.</p>
298
291
 
@@ -307,7 +300,7 @@
307
300
  <a href="#terms-and-usage-limitations" id="terms-and-usage-limitations" style="color: inherit; text-decoration: none;">
308
301
  <h1>Terms and usage limitations</h1>
309
302
  </a>
310
- <p>The data fetched from MapTiler Cloud API, with or without this library, cannot be stored or redistributed in any ways. If you have any doubt about your specific usecase, please consult our <a href="https://www.maptiler.com/cloud/terms/">legal terms</a> or contact us at <strong><a href="mailto:sales@maptiler.com">sales@maptiler.com</a></strong> .</p>
303
+ <p>The data fetched from MapTiler Cloud API, with or without this library, cannot be stored or redistributed in any ways. If you have any doubt about your specific usecase, please consult our <a href="https://www.maptiler.com/cloud/terms/#explicitly-prohibited-use">legal terms</a> or contact us.</p>
311
304
  </div></div>
312
305
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
313
306
  <div class="tsd-navigation settings">
@@ -325,7 +318,7 @@
325
318
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
326
319
  <div class="tsd-accordion-details">
327
320
  <ul>
328
- <li class="current selected"><a href="modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.0</a>
321
+ <li class="current selected"><a href="modules.html">Map<wbr/>Tiler <wbr/>Client -<wbr/> v1.1.2</a>
329
322
  <ul>
330
323
  <li class="tsd-kind-module"><a href="modules/config.html">config</a></li>
331
324
  <li class="tsd-kind-module"><a href="modules/language.html">language</a></li>