@maptiler/client 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/maptiler-client.cjs +482 -309
  2. package/dist/maptiler-client.cjs.map +1 -1
  3. package/dist/maptiler-client.d.ts +114 -5
  4. package/dist/maptiler-client.min.mjs +1 -1
  5. package/dist/maptiler-client.mjs +471 -309
  6. package/dist/maptiler-client.mjs.map +1 -1
  7. package/dist/maptiler-client.umd.js +483 -310
  8. package/dist/maptiler-client.umd.js.map +1 -1
  9. package/dist/maptiler-client.umd.min.js +1 -1
  10. package/package.json +25 -18
  11. package/readme.md +1 -1
  12. package/rollup.config.js +3 -3
  13. package/src/callFetch.ts +2 -2
  14. package/src/config.ts +4 -1
  15. package/src/demProfiler/getElevation.ts +46 -0
  16. package/src/demProfiler/index.ts +240 -0
  17. package/src/demProfiler/tileCover.ts +96 -0
  18. package/src/geometry/area.ts +96 -0
  19. package/src/geometry/distance.ts +45 -0
  20. package/src/geometry/index.ts +3 -0
  21. package/src/geometry/util.ts +34 -0
  22. package/src/index.ts +3 -0
  23. package/src/language.ts +1 -1
  24. package/src/mapstyle.ts +5 -5
  25. package/src/services/ServiceError.ts +5 -2
  26. package/src/services/coordinates.ts +14 -9
  27. package/src/services/data.ts +3 -3
  28. package/src/services/geocoding.ts +17 -14
  29. package/src/services/geolocation.ts +2 -2
  30. package/src/services/simplify.ts +3 -3
  31. package/src/services/staticMaps.ts +9 -9
  32. package/tsconfig.json +1 -1
  33. package/docs/.nojekyll +0 -1
  34. package/docs/assets/custom.css +0 -118
  35. package/docs/assets/highlight.css +0 -85
  36. package/docs/assets/main.js +0 -58
  37. package/docs/assets/search.js +0 -1
  38. package/docs/assets/style.css +0 -1280
  39. package/docs/classes/config.ClientConfig.html +0 -132
  40. package/docs/classes/services_ServiceError.ServiceError.html +0 -103
  41. package/docs/functions/language.getAutoLanguageGeocoding.html +0 -60
  42. package/docs/functions/services_simplify.default.html +0 -65
  43. package/docs/images/JS-logo.svg +0 -4
  44. package/docs/images/TS-logo.svg +0 -6
  45. package/docs/images/maptiler-client-logo.afdesign +0 -0
  46. package/docs/images/maptiler-client-logo.svg +0 -75
  47. package/docs/images/maptiler-logo-256.png +0 -0
  48. package/docs/images/maptiler-logo.svg +0 -23
  49. package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
  50. package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
  51. package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  52. package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  53. package/docs/images/screenshots/static-with-path.png +0 -0
  54. package/docs/index.html +0 -340
  55. package/docs/modules/config.html +0 -71
  56. package/docs/modules/language.html +0 -71
  57. package/docs/modules/services_ServiceError.html +0 -61
  58. package/docs/modules/services_coordinates.html +0 -84
  59. package/docs/modules/services_data.html +0 -66
  60. package/docs/modules/services_geocoding.html +0 -82
  61. package/docs/modules/services_geolocation.html +0 -68
  62. package/docs/modules/services_simplify.html +0 -61
  63. package/docs/modules/services_staticMaps.html +0 -74
  64. package/docs/modules.html +0 -59
  65. package/docs/types/config.FetchFunction.html +0 -71
  66. package/docs/types/language.LanguageGeocodingString.html +0 -58
  67. package/docs/types/services_coordinates.CoordinateExport.html +0 -71
  68. package/docs/types/services_coordinates.CoordinateGrid.html +0 -69
  69. package/docs/types/services_coordinates.CoordinateId.html +0 -71
  70. package/docs/types/services_coordinates.CoordinateSearch.html +0 -93
  71. package/docs/types/services_coordinates.CoordinateSearchResult.html +0 -75
  72. package/docs/types/services_coordinates.CoordinateTransformResult.html +0 -76
  73. package/docs/types/services_coordinates.CoordinateTransformation.html +0 -89
  74. package/docs/types/services_coordinates.CoordinatesSearchOptions.html +0 -83
  75. package/docs/types/services_coordinates.CoordinatesTransformOptions.html +0 -85
  76. package/docs/types/services_coordinates.XYZ.html +0 -73
  77. package/docs/types/services_data.GetDataOptions.html +0 -64
  78. package/docs/types/services_geocoding.ByIdGeocodingOptions.html +0 -63
  79. package/docs/types/services_geocoding.CommonForwardAndReverseGeocodingOptions.html +0 -63
  80. package/docs/types/services_geocoding.Coordinates.html +0 -63
  81. package/docs/types/services_geocoding.FeatureHierarchy.html +0 -63
  82. package/docs/types/services_geocoding.GeocodingFeature.html +0 -63
  83. package/docs/types/services_geocoding.GeocodingOptions.html +0 -63
  84. package/docs/types/services_geocoding.GeocodingSearchResult.html +0 -80
  85. package/docs/types/services_geocoding.LanguageGeocodingOptions.html +0 -70
  86. package/docs/types/services_geocoding.ReverseGeocodingOptions.html +0 -63
  87. package/docs/types/services_geolocation.GeolocationInfoOptions.html +0 -65
  88. package/docs/types/services_geolocation.GeolocationResult.html +0 -128
  89. package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +0 -61
  90. package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +0 -61
  91. package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +0 -61
  92. package/docs/types/services_staticMaps.StaticMapBaseOptions.html +0 -157
  93. package/docs/types/services_staticMaps.StaticMapMarker.html +0 -61
  94. package/docs/variables/config.config.html +0 -58
  95. package/docs/variables/language.LanguageGeocoding.html +0 -171
  96. package/docs/variables/services_coordinates.coordinates.html +0 -110
  97. package/docs/variables/services_data.data.html +0 -80
  98. package/docs/variables/services_geocoding.geocoding.html +0 -265
  99. package/docs/variables/services_geolocation.geolocation.html +0 -79
  100. package/docs/variables/services_staticMaps.staticMaps.html +0 -128
  101. package/docsmd/.nojekyll +0 -1
  102. package/docsmd/README.md +0 -873
  103. package/docsmd/assets/custom.css +0 -118
  104. package/docsmd/classes/ClientConfig.md +0 -90
  105. package/docsmd/classes/MapStyleVariant.md +0 -234
  106. package/docsmd/classes/ReferenceMapStyle.md +0 -169
  107. package/docsmd/classes/ServiceError.md +0 -52
  108. package/images/JS-logo.svg +0 -4
  109. package/images/TS-logo.svg +0 -6
  110. package/images/maptiler-client-logo.afdesign +0 -0
  111. package/images/maptiler-client-logo.svg +0 -75
  112. package/images/maptiler-logo-256.png +0 -0
  113. package/images/maptiler-logo.svg +0 -23
  114. package/images/screenshots/static-bounded-europe-1024.png +0 -0
  115. package/images/screenshots/static-bounded-europe-2048.png +0 -0
  116. package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  117. package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  118. package/images/screenshots/static-with-path.png +0 -0
@@ -1,118 +0,0 @@
1
- /* Overiding the default dark mode with color scheme from the light mode */
2
- @media (prefers-color-scheme: dark) {
3
- :root {
4
- --color-background: var(--light-color-background);
5
- --color-background-secondary: var(--light-color-background-secondary);
6
- --color-background-warning: var(--light-color-background-warning);
7
- --color-warning-text: var(--light-color-warning-text);
8
- --color-icon-background: var(--light-color-icon-background);
9
- --color-accent: var(--light-color-accent);
10
- --color-text: var(--light-color-text);
11
- --color-text-aside: var(--light-color-text-aside);
12
- --color-link: var(--light-color-link);
13
- --color-ts: var(--light-color-ts);
14
- --color-ts-interface: var(--light-color-ts-interface);
15
- --color-ts-enum: var(--light-color-ts-enum);
16
- --color-ts-class: var(--light-color-ts-class);
17
- --color-ts-function: var(--light-color-ts-function);
18
- --color-ts-namespace: var(--light-color-ts-namespace);
19
- --color-ts-private: var(--light-color-ts-private);
20
- --color-ts-variable: var(--light-color-ts-variable);
21
- --external-icon: var(--light-external-icon);
22
- --color-scheme: var(--light-color-scheme);
23
- }
24
- }
25
-
26
- body {
27
- background: #fff;
28
- font-family: "Open Sans", sans-serif;
29
- color: #6B7C92;
30
- }
31
-
32
- h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
33
- font-family: "Ubuntu","Open Sans",sans-serif;
34
- color: #525a65;
35
- }
36
-
37
- .tsd-page-toolbar {
38
- background: #fff;
39
- }
40
-
41
- #tsd-search > .title {
42
- background-image: url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%20161%2041%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C-1.20801%2C-0.711928)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.965%2C33.743C14.023%2C35.769%2019.5%2C41.264%2019.497%2C41.269C19.477%2C41.305%2024.938%2C35.908%2027.113%2C33.768L19.526%2C26.3L11.965%2C33.743Z%22%20style%3D%22fill%3Argb(58%2C24%2C136)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C26.3L27.113%2C33.768C27.124%2C33.756%2027.138%2C33.741%2027.15%2C33.731L34.73%2C26.27L27.143%2C18.802L19.526%2C26.3Z%22%20style%3D%22fill%3Argb(3%2C161%2C196)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M34.73%2C26.27L34.749%2C26.25C38.942%2C22.123%2038.945%2C15.435%2034.762%2C11.302L27.144%2C18.802L34.73%2C26.27Z%22%20style%3D%22fill%3Argb(5%2C208%2C223)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.908%2C18.802L4.349%2C26.243C4.351%2C26.245%204.352%2C26.248%204.355%2C26.25L11.953%2C33.73C11.957%2C33.734%2011.961%2C33.738%2011.966%2C33.743L19.526%2C26.3L11.908%2C18.802Z%22%20style%3D%22fill%3Argb(118%2C31%2C232)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L27.143%2C18.802L34.762%2C11.303C34.755%2C11.298%2034.753%2C11.295%2034.749%2C11.29L27.15%2C3.81C27.149%2C3.808%2027.146%2C3.806%2027.144%2C3.804L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(255%2C170%2C1)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.317%2C11.328C0.161%2C15.46%200.172%2C22.124%204.349%2C26.243L11.908%2C18.802L4.317%2C11.328Z%22%20style%3D%22fill%3Argb(241%2C23%2C93)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L11.934%2C3.829L4.355%2C11.29C4.341%2C11.303%204.33%2C11.317%204.316%2C11.329L11.908%2C18.802L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(251%2C58%2C27)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M27.144%2C3.804C22.946%2C-0.321%2016.148%2C-0.319%2011.953%2C3.81L11.934%2C3.829L19.526%2C11.303L27.144%2C3.804Z%22%20style%3D%22fill%3Argb(251%2C201%2C53)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M58.567%2C28.139L58.567%2C20.497C58.567%2C18.616%2057.566%2C16.908%2055.595%2C16.908C53.654%2C16.908%2052.508%2C18.616%2052.508%2C20.497L52.508%2C28.139L48.922%2C28.139L48.922%2C13.84L52.244%2C13.84L52.508%2C15.578C53.273%2C14.129%2054.949%2C13.609%2056.33%2C13.609C58.066%2C13.609%2059.8%2C14.304%2060.624%2C16.271C61.918%2C14.245%2063.595%2C13.667%2065.476%2C13.667C69.593%2C13.667%2071.622%2C16.155%2071.622%2C20.44L71.622%2C28.139L68.034%2C28.139L68.034%2C20.44C68.034%2C18.559%2067.24%2C16.966%2065.301%2C16.966C63.359%2C16.966%2062.153%2C18.616%2062.153%2C20.497L62.153%2C28.139L58.567%2C28.139Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M86.765%2C13.87L90.206%2C13.87L90.206%2C28.139L86.824%2C28.139L86.647%2C26.056C85.825%2C27.734%2083.561%2C28.543%2081.943%2C28.573C77.651%2C28.603%2074.474%2C25.997%2074.474%2C20.989C74.474%2C16.069%2077.798%2C13.493%2082.033%2C13.522C83.973%2C13.522%2085.824%2C14.419%2086.647%2C15.838L86.765%2C13.87ZM78.062%2C20.989C78.062%2C23.71%2079.973%2C25.331%2082.355%2C25.331C88%2C25.331%2088%2C16.677%2082.355%2C16.677C79.973%2C16.677%2078.062%2C18.269%2078.062%2C20.989Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M93.236%2C34.105L93.236%2C13.87L96.589%2C13.87L96.822%2C15.838C97.94%2C14.245%2099.882%2C13.551%20101.528%2C13.551C105.996%2C13.551%20108.968%2C16.822%20108.968%2C21.019C108.968%2C25.187%20106.291%2C28.487%20101.645%2C28.487C100.118%2C28.487%2097.852%2C28.023%2096.822%2C26.461L96.822%2C34.104L93.236%2C34.104L93.236%2C34.105ZM105.381%2C21.019C105.381%2C18.791%20103.851%2C16.966%20101.264%2C16.966C98.676%2C16.966%2097.146%2C18.791%2097.146%2C21.019C97.146%2C23.247%2098.823%2C25.073%20101.264%2C25.073C103.705%2C25.073%20105.381%2C23.247%20105.381%2C21.019Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M115.378%2C9.528L115.378%2C13.84L120.319%2C13.84L120.319%2C15.026L115.378%2C15.026L115.378%2C23.739C115.378%2C25.679%20115.791%2C27.04%20118.055%2C27.04C118.76%2C27.04%20119.554%2C26.808%20120.289%2C26.461L120.789%2C27.617C119.877%2C28.054%20118.965%2C28.342%20118.055%2C28.342C114.968%2C28.342%20113.967%2C26.547%20113.967%2C23.74L113.967%2C15.027L110.879%2C15.027L110.879%2C13.84L113.967%2C13.84L113.967%2C9.672L115.378%2C9.528Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M125.554%2C9.18C125.554%2C10.685%20123.23%2C10.685%20123.23%2C9.18C123.23%2C7.675%20125.554%2C7.675%20125.554%2C9.18ZM123.643%2C13.782L123.643%2C28.14L125.082%2C28.14L125.082%2C13.782L123.643%2C13.782Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%22129.199%22%20y%3D%227.878%22%20width%3D%221.441%22%20height%3D%2220.261%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M153.488%2C13.84L153.547%2C16.389C154.459%2C14.448%20156.518%2C13.696%20158.37%2C13.696C159.459%2C13.667%20160.515%2C13.956%20161.486%2C14.536L160.839%2C15.693C160.076%2C15.23%20159.221%2C15.027%20158.37%2C15.027C155.663%2C15.057%20153.576%2C17.198%20153.576%2C19.804L153.576%2C28.14L152.135%2C28.14L152.135%2C13.84L153.488%2C13.84Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M135.54%2C23.414C135.541%2C23.415%20135.543%2C23.417%20135.543%2C23.418L147.303%2C20.354C147.302%2C20.349%20147.302%2C20.345%20147.302%2C20.341L135.54%2C23.414Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M141.214%2C27.28C138.654%2C27.28%20136.461%2C25.701%20135.543%2C23.458L135.535%2C23.458L135.542%2C23.457C135.542%2C23.456%20135.541%2C23.455%20135.54%2C23.454L147.301%2C20.38C147.301%2C20.385%20147.302%2C20.389%20147.302%2C20.394L148.555%2C20.068C148.049%2C16.446%20144.956%2C13.658%20141.214%2C13.658C137.12%2C13.658%20133.802%2C16.996%20133.802%2C21.113C133.802%2C25.23%20137.12%2C28.569%20141.214%2C28.569C144.276%2C28.569%20146.905%2C26.7%20148.035%2C24.037L146.855%2C23.532C145.921%2C25.734%20143.747%2C27.28%20141.214%2C27.28ZM135.083%2C21.113C135.083%2C17.708%20137.828%2C14.946%20141.214%2C14.946C143.862%2C14.946%20146.117%2C16.634%20146.976%2C18.999L135.16%2C22.085C135.11%2C21.768%20135.083%2C21.444%20135.083%2C21.113Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
43
- background-repeat: no-repeat;
44
- color: #0000;
45
- font-size: 1.5em;
46
- }
47
-
48
- .tsd-page-title h2 {
49
- display: none;
50
- }
51
-
52
- .tsd-page-toolbar--hide {
53
- transform: none;
54
- }
55
-
56
- .col-menu--hide {
57
- top: 4em;
58
- }
59
-
60
-
61
- .tsd-page-toolbar {
62
- border-color: #d3dbec;
63
- }
64
-
65
- .col-menu {
66
- border-left: none;
67
- background-color: #F3F6FF;
68
- }
69
-
70
- .menu-sticky-wrap {
71
- top: 2.5rem;
72
- margin-top: 2.5rem;
73
- /* height: 100vh; */
74
- height: calc(100vh - 2.5rem);
75
- }
76
-
77
- .tsd-generator {
78
- display: none;
79
- }
80
-
81
- .settings {
82
- display: none;
83
- }
84
-
85
- .tsd-navigation a {
86
- color: #252525;
87
- }
88
-
89
- .tsd-navigation.primary ul li a:hover {
90
- border-color: #b3deff;
91
- }
92
-
93
- .tsd-navigation.primary li.selected > a,
94
- .tsd-navigation.primary li.current > a {
95
- border-color: #8bc9f9;
96
- }
97
-
98
- .tsd-index-panel > .tsd-index-heading {
99
- display: none;
100
- }
101
-
102
- #tsd-search.has-focus {
103
- background-color: #fff;
104
- }
105
-
106
- .tsd-navigation.secondary {
107
- border-top: solid 1px #d3dbec;
108
- padding-top: 1rem;
109
- }
110
-
111
- pre {
112
- border-color: #d3dbec;
113
- }
114
-
115
- code, pre {
116
- border-radius: 3px;
117
- background-color: #fafbff;
118
- }
@@ -1,90 +0,0 @@
1
- [MapTiler Client - v1.6.0](../README.md) / ClientConfig
2
-
3
- # Class: ClientConfig
4
-
5
- The configuration object definition
6
-
7
- ## Table of contents
8
-
9
- ### Constructors
10
-
11
- - [constructor](ClientConfig.md#constructor)
12
-
13
- ### Accessors
14
-
15
- - [apiKey](ClientConfig.md#apikey)
16
- - [fetch](ClientConfig.md#fetch)
17
-
18
- ## Constructors
19
-
20
- ### constructor
21
-
22
- • **new ClientConfig**()
23
-
24
- ## Accessors
25
-
26
- ### apiKey
27
-
28
- • `get` **apiKey**(): `string`
29
-
30
- Get the MapTiler Cloud API key
31
-
32
- #### Returns
33
-
34
- `string`
35
-
36
- #### Defined in
37
-
38
- [config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L41)
39
-
40
- • `set` **apiKey**(`k`): `void`
41
-
42
- Set the MapTiler Cloud API key
43
-
44
- #### Parameters
45
-
46
- | Name | Type |
47
- | :------ | :------ |
48
- | `k` | `string` |
49
-
50
- #### Returns
51
-
52
- `void`
53
-
54
- #### Defined in
55
-
56
- [config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L34)
57
-
58
- ___
59
-
60
- ### fetch
61
-
62
- • `get` **fetch**(): [`FetchFunction`](../README.md#fetchfunction)
63
-
64
- Get the fetch fucntion
65
-
66
- #### Returns
67
-
68
- [`FetchFunction`](../README.md#fetchfunction)
69
-
70
- #### Defined in
71
-
72
- [config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L55)
73
-
74
- • `set` **fetch**(`f`): `void`
75
-
76
- Set a the custom fetch function to replace the default one
77
-
78
- #### Parameters
79
-
80
- | Name | Type |
81
- | :------ | :------ |
82
- | `f` | [`FetchFunction`](../README.md#fetchfunction) |
83
-
84
- #### Returns
85
-
86
- `void`
87
-
88
- #### Defined in
89
-
90
- [config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/config.ts#L48)
@@ -1,234 +0,0 @@
1
- [MapTiler Client - v1.6.0](../README.md) / MapStyleVariant
2
-
3
- # Class: MapStyleVariant
4
-
5
- An instance of MapStyleVariant contains information about a style to use that belong to a reference style
6
-
7
- ## Table of contents
8
-
9
- ### Constructors
10
-
11
- - [constructor](MapStyleVariant.md#constructor)
12
-
13
- ### Methods
14
-
15
- - [getDescription](MapStyleVariant.md#getdescription)
16
- - [getExpandedStyleURL](MapStyleVariant.md#getexpandedstyleurl)
17
- - [getFullName](MapStyleVariant.md#getfullname)
18
- - [getId](MapStyleVariant.md#getid)
19
- - [getImageURL](MapStyleVariant.md#getimageurl)
20
- - [getName](MapStyleVariant.md#getname)
21
- - [getReferenceStyle](MapStyleVariant.md#getreferencestyle)
22
- - [getType](MapStyleVariant.md#gettype)
23
- - [getVariant](MapStyleVariant.md#getvariant)
24
- - [getVariants](MapStyleVariant.md#getvariants)
25
- - [hasVariant](MapStyleVariant.md#hasvariant)
26
-
27
- ## Constructors
28
-
29
- ### constructor
30
-
31
- • **new MapStyleVariant**(`name`, `variantType`, `id`, `referenceStyle`, `description`, `imageURL`)
32
-
33
- #### Parameters
34
-
35
- | Name | Type | Description |
36
- | :------ | :------ | :------ |
37
- | `name` | `string` | Human-friendly name |
38
- | `variantType` | `string` | Variant name the variant is addressed to from its reference style: `MapStyle.REFERNCE_STYLE_NAME.VARIANT_TYPE` |
39
- | `id` | `string` | MapTiler Cloud id |
40
- | `referenceStyle` | [`ReferenceMapStyle`](ReferenceMapStyle.md) | Reference map style, used to retrieve sibling variants |
41
- | `description` | `string` | Human-friendly description |
42
- | `imageURL` | `string` | URL to an image describing the style variant |
43
-
44
- #### Defined in
45
-
46
- [mapstyle.ts:46](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L46)
47
-
48
- ## Methods
49
-
50
- ### getDescription
51
-
52
- ▸ **getDescription**(): `string`
53
-
54
- Get the human-friendly description
55
-
56
- #### Returns
57
-
58
- `string`
59
-
60
- #### Defined in
61
-
62
- [mapstyle.ts:109](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L109)
63
-
64
- ___
65
-
66
- ### getExpandedStyleURL
67
-
68
- ▸ **getExpandedStyleURL**(): `string`
69
-
70
- Get the style as usable by MapLibre, a string (URL) or a plain style description (StyleSpecification)
71
-
72
- #### Returns
73
-
74
- `string`
75
-
76
- #### Defined in
77
-
78
- [mapstyle.ts:161](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L161)
79
-
80
- ___
81
-
82
- ### getFullName
83
-
84
- ▸ **getFullName**(): `string`
85
-
86
- #### Returns
87
-
88
- `string`
89
-
90
- #### Defined in
91
-
92
- [mapstyle.ts:86](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L86)
93
-
94
- ___
95
-
96
- ### getId
97
-
98
- ▸ **getId**(): `string`
99
-
100
- Get the MapTiler Cloud id
101
-
102
- #### Returns
103
-
104
- `string`
105
-
106
- #### Defined in
107
-
108
- [mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L102)
109
-
110
- ___
111
-
112
- ### getImageURL
113
-
114
- ▸ **getImageURL**(): `string`
115
-
116
- Get the image URL that represent _this_ variant
117
-
118
- #### Returns
119
-
120
- `string`
121
-
122
- #### Defined in
123
-
124
- [mapstyle.ts:153](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L153)
125
-
126
- ___
127
-
128
- ### getName
129
-
130
- ▸ **getName**(): `string`
131
-
132
- Get the human-friendly name
133
-
134
- #### Returns
135
-
136
- `string`
137
-
138
- #### Defined in
139
-
140
- [mapstyle.ts:82](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L82)
141
-
142
- ___
143
-
144
- ### getReferenceStyle
145
-
146
- ▸ **getReferenceStyle**(): [`ReferenceMapStyle`](ReferenceMapStyle.md)
147
-
148
- Get the reference style this variant belongs to
149
-
150
- #### Returns
151
-
152
- [`ReferenceMapStyle`](ReferenceMapStyle.md)
153
-
154
- #### Defined in
155
-
156
- [mapstyle.ts:117](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L117)
157
-
158
- ___
159
-
160
- ### getType
161
-
162
- ▸ **getType**(): `string`
163
-
164
- Get the variant type (eg. "DEFAULT", "DARK", "PASTEL", etc.)
165
-
166
- #### Returns
167
-
168
- `string`
169
-
170
- #### Defined in
171
-
172
- [mapstyle.ts:94](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L94)
173
-
174
- ___
175
-
176
- ### getVariant
177
-
178
- ▸ **getVariant**(`variantType`): [`MapStyleVariant`](MapStyleVariant.md)
179
-
180
- Retrieve the variant of a given type. If not found, will return the "DEFAULT" variant.
181
- (eg. _this_ "DARK" variant does not have any "PASTEL" variant, then the "DEFAULT" is returned)
182
-
183
- #### Parameters
184
-
185
- | Name | Type |
186
- | :------ | :------ |
187
- | `variantType` | `string` |
188
-
189
- #### Returns
190
-
191
- [`MapStyleVariant`](MapStyleVariant.md)
192
-
193
- #### Defined in
194
-
195
- [mapstyle.ts:137](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L137)
196
-
197
- ___
198
-
199
- ### getVariants
200
-
201
- ▸ **getVariants**(): [`MapStyleVariant`](MapStyleVariant.md)[]
202
-
203
- Get all the variants for _this_ variants, except _this_ current one
204
-
205
- #### Returns
206
-
207
- [`MapStyleVariant`](MapStyleVariant.md)[]
208
-
209
- #### Defined in
210
-
211
- [mapstyle.ts:145](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L145)
212
-
213
- ___
214
-
215
- ### hasVariant
216
-
217
- ▸ **hasVariant**(`variantType`): `boolean`
218
-
219
- Check if a variant of a given type exists for _this_ variants
220
- (eg. if this is a "DARK", then we can check if there is a "LIGHT" variant of it)
221
-
222
- #### Parameters
223
-
224
- | Name | Type |
225
- | :------ | :------ |
226
- | `variantType` | `string` |
227
-
228
- #### Returns
229
-
230
- `boolean`
231
-
232
- #### Defined in
233
-
234
- [mapstyle.ts:127](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L127)
@@ -1,169 +0,0 @@
1
- [MapTiler Client - v1.6.0](../README.md) / ReferenceMapStyle
2
-
3
- # Class: ReferenceMapStyle
4
-
5
- An instance of reference style contains a list of StyleVariants ordered by relevance
6
-
7
- ## Table of contents
8
-
9
- ### Constructors
10
-
11
- - [constructor](ReferenceMapStyle.md#constructor)
12
-
13
- ### Methods
14
-
15
- - [addVariant](ReferenceMapStyle.md#addvariant)
16
- - [getDefaultVariant](ReferenceMapStyle.md#getdefaultvariant)
17
- - [getId](ReferenceMapStyle.md#getid)
18
- - [getName](ReferenceMapStyle.md#getname)
19
- - [getVariant](ReferenceMapStyle.md#getvariant)
20
- - [getVariants](ReferenceMapStyle.md#getvariants)
21
- - [hasVariant](ReferenceMapStyle.md#hasvariant)
22
-
23
- ## Constructors
24
-
25
- ### constructor
26
-
27
- • **new ReferenceMapStyle**(`name`, `id`)
28
-
29
- #### Parameters
30
-
31
- | Name | Type | Description |
32
- | :------ | :------ | :------ |
33
- | `name` | `string` | Human-friendly name of this reference style |
34
- | `id` | `string` | ID of this reference style |
35
-
36
- #### Defined in
37
-
38
- [mapstyle.ts:180](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L180)
39
-
40
- ## Methods
41
-
42
- ### addVariant
43
-
44
- ▸ **addVariant**(`v`): `void`
45
-
46
- Add a variant to _this_ reference style
47
-
48
- #### Parameters
49
-
50
- | Name | Type |
51
- | :------ | :------ |
52
- | `v` | [`MapStyleVariant`](MapStyleVariant.md) |
53
-
54
- #### Returns
55
-
56
- `void`
57
-
58
- #### Defined in
59
-
60
- [mapstyle.ts:212](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L212)
61
-
62
- ___
63
-
64
- ### getDefaultVariant
65
-
66
- ▸ **getDefaultVariant**(): [`MapStyleVariant`](MapStyleVariant.md)
67
-
68
- Get the defualt variant for this reference style
69
-
70
- #### Returns
71
-
72
- [`MapStyleVariant`](MapStyleVariant.md)
73
-
74
- #### Defined in
75
-
76
- [mapstyle.ts:250](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L250)
77
-
78
- ___
79
-
80
- ### getId
81
-
82
- ▸ **getId**(): `string`
83
-
84
- Get the id of _this_ reference style
85
-
86
- #### Returns
87
-
88
- `string`
89
-
90
- #### Defined in
91
-
92
- [mapstyle.ts:204](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L204)
93
-
94
- ___
95
-
96
- ### getName
97
-
98
- ▸ **getName**(): `string`
99
-
100
- Get the human-friendly name of this reference style
101
-
102
- #### Returns
103
-
104
- `string`
105
-
106
- #### Defined in
107
-
108
- [mapstyle.ts:196](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L196)
109
-
110
- ___
111
-
112
- ### getVariant
113
-
114
- ▸ **getVariant**(`variantType`): [`MapStyleVariant`](MapStyleVariant.md)
115
-
116
- Get a given variant. If the given type of variant does not exist for this reference style,
117
- then the most relevant default variant is returned instead
118
-
119
- #### Parameters
120
-
121
- | Name | Type |
122
- | :------ | :------ |
123
- | `variantType` | `string` |
124
-
125
- #### Returns
126
-
127
- [`MapStyleVariant`](MapStyleVariant.md)
128
-
129
- #### Defined in
130
-
131
- [mapstyle.ts:232](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L232)
132
-
133
- ___
134
-
135
- ### getVariants
136
-
137
- ▸ **getVariants**(): [`MapStyleVariant`](MapStyleVariant.md)[]
138
-
139
- Get the list of variants for this reference style
140
-
141
- #### Returns
142
-
143
- [`MapStyleVariant`](MapStyleVariant.md)[]
144
-
145
- #### Defined in
146
-
147
- [mapstyle.ts:242](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L242)
148
-
149
- ___
150
-
151
- ### hasVariant
152
-
153
- ▸ **hasVariant**(`variantType`): `boolean`
154
-
155
- Check if a given variant type exists for this reference style
156
-
157
- #### Parameters
158
-
159
- | Name | Type |
160
- | :------ | :------ |
161
- | `variantType` | `string` |
162
-
163
- #### Returns
164
-
165
- `boolean`
166
-
167
- #### Defined in
168
-
169
- [mapstyle.ts:222](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/mapstyle.ts#L222)
@@ -1,52 +0,0 @@
1
- [MapTiler Client - v1.6.0](../README.md) / ServiceError
2
-
3
- # Class: ServiceError
4
-
5
- A ServiceError is an Error that includes the HTTP response details
6
-
7
- ## Hierarchy
8
-
9
- - `Error`
10
-
11
- ↳ **`ServiceError`**
12
-
13
- ## Table of contents
14
-
15
- ### Constructors
16
-
17
- - [constructor](ServiceError.md#constructor)
18
-
19
- ### Properties
20
-
21
- - [res](ServiceError.md#res)
22
-
23
- ## Constructors
24
-
25
- ### constructor
26
-
27
- • **new ServiceError**(`res`, `customMessage?`)
28
-
29
- #### Parameters
30
-
31
- | Name | Type | Default value |
32
- | :------ | :------ | :------ |
33
- | `res` | `Response` | `undefined` |
34
- | `customMessage` | `string` | `""` |
35
-
36
- #### Overrides
37
-
38
- Error.constructor
39
-
40
- #### Defined in
41
-
42
- [services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/ServiceError.ts#L5)
43
-
44
- ## Properties
45
-
46
- ### res
47
-
48
- • **res**: `Response`
49
-
50
- #### Defined in
51
-
52
- [services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/6f9a8fe/src/services/ServiceError.ts#L5)
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 630 630">
2
- <rect width="630" height="630" fill="#f7df1e"/>
3
- <path d="m423.2 492.19c12.69 20.72 29.2 35.95 58.4 35.95 24.53 0 40.2-12.26 40.2-29.2 0-20.3-16.1-27.49-43.1-39.3l-14.8-6.35c-42.72-18.2-71.1-41-71.1-89.2 0-44.4 33.83-78.2 86.7-78.2 37.64 0 64.7 13.1 84.2 47.4l-46.1 29.6c-10.15-18.2-21.1-25.37-38.1-25.37-17.34 0-28.33 11-28.33 25.37 0 17.76 11 24.95 36.4 35.95l14.8 6.34c50.3 21.57 78.7 43.56 78.7 93 0 53.3-41.87 82.5-98.1 82.5-54.98 0-90.5-26.2-107.88-60.54zm-209.13 5.13c9.3 16.5 17.76 30.45 38.1 30.45 19.45 0 31.72-7.61 31.72-37.2v-201.3h59.2v202.1c0 61.3-35.94 89.2-88.4 89.2-47.4 0-74.85-24.53-88.81-54.075z"/>
4
- </svg>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="512" height="512" fill="none" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
3
- <title>TypeScript logo</title>
4
- <rect width="512" height="512" rx="0" fill="#3178c6"/>
5
- <path d="m317 407v50c8.1 4.2 18 7.3 29 9.4s23 3.1 35 3.1c12 0 23-1.1 34-3.4 11-2.3 20-6.1 28-11 8.1-5.3 15-12 19-21s7.1-19 7.1-32c0-9.1-1.4-17-4.1-24s-6.6-13-12-18c-5.1-5.3-11-10-18-14s-15-8.2-24-12c-6.6-2.7-12-5.3-18-7.9-5.2-2.6-9.7-5.2-13-7.8-3.7-2.7-6.5-5.5-8.5-8.4-2-3-3-6.3-3-10 0-3.4 0.89-6.5 2.7-9.3s4.3-5.1 7.5-7.1c3.2-2 7.2-3.5 12-4.6 4.7-1.1 9.9-1.6 16-1.6 4.2 0 8.6 0.31 13 0.94 4.6 0.63 9.3 1.6 14 2.9 4.7 1.3 9.3 2.9 14 4.9 4.4 2 8.5 4.3 12 6.9v-47c-7.6-2.9-16-5.1-25-6.5s-19-2.1-31-2.1c-12 0-23 1.3-34 3.8s-20 6.5-28 12c-8.1 5.4-14 12-19 21-4.7 8.4-7 18-7 30 0 15 4.3 28 13 38 8.6 11 22 19 39 27 6.9 2.8 13 5.6 19 8.3s11 5.5 15 8.4c4.3 2.9 7.7 6.1 10 9.5 2.5 3.4 3.8 7.4 3.8 12 0 3.2-0.78 6.2-2.3 9s-3.9 5.2-7.1 7.2-7.1 3.6-12 4.8c-4.7 1.1-10 1.7-17 1.7-11 0-22-1.9-32-5.7-11-3.8-21-9.5-30-17zm-84-123h64v-41h-179v41h64v183h51z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd" style="fill:#fff"/>
6
- </svg>