@maptiler/sdk 1.0.0 → 1.0.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 (166) hide show
  1. package/demos/maptiler-sdk.umd.js +11 -6
  2. package/dist/maptiler-sdk.min.mjs +1 -1
  3. package/dist/maptiler-sdk.mjs +8 -3
  4. package/dist/maptiler-sdk.mjs.map +1 -1
  5. package/dist/maptiler-sdk.umd.js +11 -6
  6. package/dist/maptiler-sdk.umd.js.map +1 -1
  7. package/dist/maptiler-sdk.umd.min.js +5 -5
  8. package/package.json +1 -1
  9. package/readme.md +11 -11
  10. package/src/CustomGeolocateControl.ts +7 -5
  11. package/docs/.nojekyll +0 -1
  12. package/docs/assets/custom.css +0 -118
  13. package/docs/assets/highlight.css +0 -134
  14. package/docs/assets/main.js +0 -54
  15. package/docs/assets/search.js +0 -1
  16. package/docs/assets/style.css +0 -1257
  17. package/docs/classes/Map.html +0 -273
  18. package/docs/classes/Point.html +0 -549
  19. package/docs/classes/SdkConfig.html +0 -188
  20. package/docs/demos/maptiler-sdk.css +0 -147
  21. package/docs/demos/maptiler-sdk.umd.js +0 -3287
  22. package/docs/demos/simple.html +0 -63
  23. package/docs/functions/addProtocol.html +0 -146
  24. package/docs/functions/clearPrewarmedResources.html +0 -92
  25. package/docs/functions/clearStorage.html +0 -124
  26. package/docs/functions/getRTLTextPluginStatus.html +0 -92
  27. package/docs/functions/prewarm.html +0 -92
  28. package/docs/functions/removeProtocol.html +0 -106
  29. package/docs/functions/setRTLTextPlugin.html +0 -112
  30. package/docs/functions/supported.html +0 -97
  31. package/docs/images/JS-logo.svg +0 -4
  32. package/docs/images/TS-logo.svg +0 -6
  33. package/docs/images/maptiler-logo.svg +0 -19
  34. package/docs/images/maptiler-sdk-logo.afdesign +0 -0
  35. package/docs/images/maptiler-sdk-logo.svg +0 -66
  36. package/docs/images/screenshots/alps.gif +0 -0
  37. package/docs/images/screenshots/grandcanyon.gif +0 -0
  38. package/docs/images/screenshots/lang-arabic.png +0 -0
  39. package/docs/images/screenshots/lang-hebrew.png +0 -0
  40. package/docs/images/screenshots/multilang.gif +0 -0
  41. package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
  42. package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
  43. package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  44. package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  45. package/docs/images/screenshots/static-with-path.png +0 -0
  46. package/docs/images/screenshots/style-basic-v2.png +0 -0
  47. package/docs/images/screenshots/style-bright.png +0 -0
  48. package/docs/images/screenshots/style-dataviz-dark.png +0 -0
  49. package/docs/images/screenshots/style-hybrid.png +0 -0
  50. package/docs/images/screenshots/style-osm.png +0 -0
  51. package/docs/images/screenshots/style-outdoor.png +0 -0
  52. package/docs/images/screenshots/style-pastel.png +0 -0
  53. package/docs/images/screenshots/style-satellite.png +0 -0
  54. package/docs/images/screenshots/style-streets-v2-dark.png +0 -0
  55. package/docs/images/screenshots/style-streets-v2-light.png +0 -0
  56. package/docs/images/screenshots/style-streets-v2.png +0 -0
  57. package/docs/images/screenshots/style-toner.png +0 -0
  58. package/docs/images/screenshots/style-topo.png +0 -0
  59. package/docs/images/screenshots/style-topographique.png +0 -0
  60. package/docs/images/screenshots/style-voyager.png +0 -0
  61. package/docs/images/screenshots/style-winter.png +0 -0
  62. package/docs/index.html +0 -601
  63. package/docs/modules.html +0 -142
  64. package/docs/types/LanguageKey.html +0 -90
  65. package/docs/types/LanguageString.html +0 -90
  66. package/docs/types/MapOptions.html +0 -90
  67. package/docs/types/Matrix2.html +0 -90
  68. package/docs/types/Unit.html +0 -88
  69. package/docs/variables/AJAXError.html +0 -88
  70. package/docs/variables/AttributionControl.html +0 -88
  71. package/docs/variables/CanvasSource.html +0 -88
  72. package/docs/variables/Evented.html +0 -88
  73. package/docs/variables/FullscreenControl.html +0 -88
  74. package/docs/variables/GeoJSONSource.html +0 -88
  75. package/docs/variables/GeolocateControl.html +0 -88
  76. package/docs/variables/GeolocationType.html +0 -95
  77. package/docs/variables/ImageSource.html +0 -88
  78. package/docs/variables/Language.html +0 -249
  79. package/docs/variables/LngLat.html +0 -88
  80. package/docs/variables/LngLatBounds.html +0 -88
  81. package/docs/variables/LogoControl.html +0 -88
  82. package/docs/variables/Marker.html +0 -88
  83. package/docs/variables/MercatorCoordinate.html +0 -88
  84. package/docs/variables/NavigationControl.html +0 -88
  85. package/docs/variables/Popup.html +0 -88
  86. package/docs/variables/RasterDEMTileSource.html +0 -88
  87. package/docs/variables/RasterTileSource.html +0 -88
  88. package/docs/variables/ScaleControl.html +0 -88
  89. package/docs/variables/Style.html +0 -88
  90. package/docs/variables/TerrainControl.html +0 -88
  91. package/docs/variables/VectorTileSource.html +0 -88
  92. package/docs/variables/VideoSource.html +0 -88
  93. package/docs/variables/config.html +0 -88
  94. package/docs/variables/maxParallelImageRequests.html +0 -88
  95. package/docs/variables/version.html +0 -88
  96. package/docs/variables/workerCount.html +0 -88
  97. package/docs/variables/workerUrl.html +0 -88
  98. package/docsmd/.nojekyll +0 -1
  99. package/docsmd/README.md +0 -710
  100. package/docsmd/assets/custom.css +0 -118
  101. package/docsmd/classes/Map.md +0 -292
  102. package/docsmd/classes/Point.md +0 -603
  103. package/docsmd/classes/SdkConfig.md +0 -186
  104. package/docsmd/images/JS-logo.svg +0 -4
  105. package/docsmd/images/TS-logo.svg +0 -6
  106. package/docsmd/images/maptiler-logo.svg +0 -19
  107. package/docsmd/images/maptiler-sdk-logo.afdesign +0 -0
  108. package/docsmd/images/maptiler-sdk-logo.svg +0 -66
  109. package/docsmd/images/screenshots/alps.gif +0 -0
  110. package/docsmd/images/screenshots/grandcanyon.gif +0 -0
  111. package/docsmd/images/screenshots/lang-arabic.png +0 -0
  112. package/docsmd/images/screenshots/lang-hebrew.png +0 -0
  113. package/docsmd/images/screenshots/multilang.gif +0 -0
  114. package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
  115. package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
  116. package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  117. package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  118. package/docsmd/images/screenshots/static-with-path.png +0 -0
  119. package/docsmd/images/screenshots/style-basic-v2.png +0 -0
  120. package/docsmd/images/screenshots/style-bright.png +0 -0
  121. package/docsmd/images/screenshots/style-dataviz-dark.png +0 -0
  122. package/docsmd/images/screenshots/style-hybrid.png +0 -0
  123. package/docsmd/images/screenshots/style-osm.png +0 -0
  124. package/docsmd/images/screenshots/style-outdoor.png +0 -0
  125. package/docsmd/images/screenshots/style-pastel.png +0 -0
  126. package/docsmd/images/screenshots/style-satellite.png +0 -0
  127. package/docsmd/images/screenshots/style-streets-v2-dark.png +0 -0
  128. package/docsmd/images/screenshots/style-streets-v2-light.png +0 -0
  129. package/docsmd/images/screenshots/style-streets-v2.png +0 -0
  130. package/docsmd/images/screenshots/style-toner.png +0 -0
  131. package/docsmd/images/screenshots/style-topo.png +0 -0
  132. package/docsmd/images/screenshots/style-topographique.png +0 -0
  133. package/docsmd/images/screenshots/style-voyager.png +0 -0
  134. package/docsmd/images/screenshots/style-winter.png +0 -0
  135. package/images/JS-logo.svg +0 -4
  136. package/images/TS-logo.svg +0 -6
  137. package/images/maptiler-logo.svg +0 -19
  138. package/images/maptiler-sdk-logo.afdesign +0 -0
  139. package/images/maptiler-sdk-logo.svg +0 -66
  140. package/images/screenshots/alps.gif +0 -0
  141. package/images/screenshots/grandcanyon.gif +0 -0
  142. package/images/screenshots/lang-arabic.png +0 -0
  143. package/images/screenshots/lang-hebrew.png +0 -0
  144. package/images/screenshots/multilang.gif +0 -0
  145. package/images/screenshots/static-bounded-europe-1024.png +0 -0
  146. package/images/screenshots/static-bounded-europe-2048.png +0 -0
  147. package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  148. package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  149. package/images/screenshots/static-with-path.png +0 -0
  150. package/images/screenshots/style-basic-v2.png +0 -0
  151. package/images/screenshots/style-bright.png +0 -0
  152. package/images/screenshots/style-dataviz-dark.png +0 -0
  153. package/images/screenshots/style-hybrid.png +0 -0
  154. package/images/screenshots/style-osm.png +0 -0
  155. package/images/screenshots/style-outdoor.png +0 -0
  156. package/images/screenshots/style-pastel.png +0 -0
  157. package/images/screenshots/style-satellite.png +0 -0
  158. package/images/screenshots/style-streets-v2-dark.png +0 -0
  159. package/images/screenshots/style-streets-v2-light.png +0 -0
  160. package/images/screenshots/style-streets-v2.png +0 -0
  161. package/images/screenshots/style-toner.png +0 -0
  162. package/images/screenshots/style-topo.png +0 -0
  163. package/images/screenshots/style-topographique.png +0 -0
  164. package/images/screenshots/style-voyager.png +0 -0
  165. package/images/screenshots/style-winter.png +0 -0
  166. package/scripts/replace-path-with-content.js +0 -51
@@ -1,51 +0,0 @@
1
- /**
2
- * This script takes a text file as input and a text file as output.
3
- * The input text is supposed to contain occurences of filepath between
4
- * square brackets such as "foo bar [some/file/path.txt] foofoo barbar".
5
- *
6
- * This script replaces this pattern by the actual content of the file
7
- * between square brackets.
8
- *
9
- * The main purpose is to inject actual SVG string (URL encoded) into CSS
10
- * for `background-image` properties. If need be, we could also apply the
11
- * same logic for more file types such as png with base64 string.
12
- *
13
- * This script is used by rollup.config.js , so check there to see it in
14
- * application.
15
- */
16
-
17
- import fs from 'fs';
18
- import { exit } from 'process';
19
-
20
- if (process.argv.length !== 4) {
21
- console.error("This script takes 2 arguments: input_filepath.txt output_filpath.txt")
22
- exit(1);
23
- }
24
-
25
- let text = fs.readFileSync(process.argv[2], "utf8");
26
-
27
- // replace based on file extension
28
- const transforms = {
29
- svg: (filepath) => {
30
- const fileText = encodeURIComponent(fs.readFileSync(filepath, "utf8"));
31
- return `"data:image/svg+xml;charset=utf-8,${fileText}"`;
32
- }
33
- }
34
-
35
- // Find all occurrences of file paths between square brackets
36
- let filePaths = text.match(/\[(.*?)\]/g);
37
-
38
- // Replace all occurrences of file paths with the actual text contained in the files
39
- filePaths.forEach(filePath => {
40
- let filepath = filePath.slice(1, -1); // remove the square brackets
41
- const extension = filepath.split(".").pop().toLowerCase();
42
-
43
- if (!(extension in transforms)) {
44
- return;
45
- }
46
-
47
- text = text.replace(filePath, transforms[extension](filepath))
48
- });
49
-
50
- // console.log(text);
51
- fs.writeFileSync(process.argv[3], text);