@maptiler/sdk 1.0.0 → 1.0.1

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 (158) hide show
  1. package/package.json +1 -1
  2. package/readme.md +11 -11
  3. package/docs/.nojekyll +0 -1
  4. package/docs/assets/custom.css +0 -118
  5. package/docs/assets/highlight.css +0 -134
  6. package/docs/assets/main.js +0 -54
  7. package/docs/assets/search.js +0 -1
  8. package/docs/assets/style.css +0 -1257
  9. package/docs/classes/Map.html +0 -273
  10. package/docs/classes/Point.html +0 -549
  11. package/docs/classes/SdkConfig.html +0 -188
  12. package/docs/demos/maptiler-sdk.css +0 -147
  13. package/docs/demos/maptiler-sdk.umd.js +0 -3287
  14. package/docs/demos/simple.html +0 -63
  15. package/docs/functions/addProtocol.html +0 -146
  16. package/docs/functions/clearPrewarmedResources.html +0 -92
  17. package/docs/functions/clearStorage.html +0 -124
  18. package/docs/functions/getRTLTextPluginStatus.html +0 -92
  19. package/docs/functions/prewarm.html +0 -92
  20. package/docs/functions/removeProtocol.html +0 -106
  21. package/docs/functions/setRTLTextPlugin.html +0 -112
  22. package/docs/functions/supported.html +0 -97
  23. package/docs/images/JS-logo.svg +0 -4
  24. package/docs/images/TS-logo.svg +0 -6
  25. package/docs/images/maptiler-logo.svg +0 -19
  26. package/docs/images/maptiler-sdk-logo.afdesign +0 -0
  27. package/docs/images/maptiler-sdk-logo.svg +0 -66
  28. package/docs/images/screenshots/alps.gif +0 -0
  29. package/docs/images/screenshots/grandcanyon.gif +0 -0
  30. package/docs/images/screenshots/lang-arabic.png +0 -0
  31. package/docs/images/screenshots/lang-hebrew.png +0 -0
  32. package/docs/images/screenshots/multilang.gif +0 -0
  33. package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
  34. package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
  35. package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  36. package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  37. package/docs/images/screenshots/static-with-path.png +0 -0
  38. package/docs/images/screenshots/style-basic-v2.png +0 -0
  39. package/docs/images/screenshots/style-bright.png +0 -0
  40. package/docs/images/screenshots/style-dataviz-dark.png +0 -0
  41. package/docs/images/screenshots/style-hybrid.png +0 -0
  42. package/docs/images/screenshots/style-osm.png +0 -0
  43. package/docs/images/screenshots/style-outdoor.png +0 -0
  44. package/docs/images/screenshots/style-pastel.png +0 -0
  45. package/docs/images/screenshots/style-satellite.png +0 -0
  46. package/docs/images/screenshots/style-streets-v2-dark.png +0 -0
  47. package/docs/images/screenshots/style-streets-v2-light.png +0 -0
  48. package/docs/images/screenshots/style-streets-v2.png +0 -0
  49. package/docs/images/screenshots/style-toner.png +0 -0
  50. package/docs/images/screenshots/style-topo.png +0 -0
  51. package/docs/images/screenshots/style-topographique.png +0 -0
  52. package/docs/images/screenshots/style-voyager.png +0 -0
  53. package/docs/images/screenshots/style-winter.png +0 -0
  54. package/docs/index.html +0 -601
  55. package/docs/modules.html +0 -142
  56. package/docs/types/LanguageKey.html +0 -90
  57. package/docs/types/LanguageString.html +0 -90
  58. package/docs/types/MapOptions.html +0 -90
  59. package/docs/types/Matrix2.html +0 -90
  60. package/docs/types/Unit.html +0 -88
  61. package/docs/variables/AJAXError.html +0 -88
  62. package/docs/variables/AttributionControl.html +0 -88
  63. package/docs/variables/CanvasSource.html +0 -88
  64. package/docs/variables/Evented.html +0 -88
  65. package/docs/variables/FullscreenControl.html +0 -88
  66. package/docs/variables/GeoJSONSource.html +0 -88
  67. package/docs/variables/GeolocateControl.html +0 -88
  68. package/docs/variables/GeolocationType.html +0 -95
  69. package/docs/variables/ImageSource.html +0 -88
  70. package/docs/variables/Language.html +0 -249
  71. package/docs/variables/LngLat.html +0 -88
  72. package/docs/variables/LngLatBounds.html +0 -88
  73. package/docs/variables/LogoControl.html +0 -88
  74. package/docs/variables/Marker.html +0 -88
  75. package/docs/variables/MercatorCoordinate.html +0 -88
  76. package/docs/variables/NavigationControl.html +0 -88
  77. package/docs/variables/Popup.html +0 -88
  78. package/docs/variables/RasterDEMTileSource.html +0 -88
  79. package/docs/variables/RasterTileSource.html +0 -88
  80. package/docs/variables/ScaleControl.html +0 -88
  81. package/docs/variables/Style.html +0 -88
  82. package/docs/variables/TerrainControl.html +0 -88
  83. package/docs/variables/VectorTileSource.html +0 -88
  84. package/docs/variables/VideoSource.html +0 -88
  85. package/docs/variables/config.html +0 -88
  86. package/docs/variables/maxParallelImageRequests.html +0 -88
  87. package/docs/variables/version.html +0 -88
  88. package/docs/variables/workerCount.html +0 -88
  89. package/docs/variables/workerUrl.html +0 -88
  90. package/docsmd/.nojekyll +0 -1
  91. package/docsmd/README.md +0 -710
  92. package/docsmd/assets/custom.css +0 -118
  93. package/docsmd/classes/Map.md +0 -292
  94. package/docsmd/classes/Point.md +0 -603
  95. package/docsmd/classes/SdkConfig.md +0 -186
  96. package/docsmd/images/JS-logo.svg +0 -4
  97. package/docsmd/images/TS-logo.svg +0 -6
  98. package/docsmd/images/maptiler-logo.svg +0 -19
  99. package/docsmd/images/maptiler-sdk-logo.afdesign +0 -0
  100. package/docsmd/images/maptiler-sdk-logo.svg +0 -66
  101. package/docsmd/images/screenshots/alps.gif +0 -0
  102. package/docsmd/images/screenshots/grandcanyon.gif +0 -0
  103. package/docsmd/images/screenshots/lang-arabic.png +0 -0
  104. package/docsmd/images/screenshots/lang-hebrew.png +0 -0
  105. package/docsmd/images/screenshots/multilang.gif +0 -0
  106. package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
  107. package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
  108. package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  109. package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  110. package/docsmd/images/screenshots/static-with-path.png +0 -0
  111. package/docsmd/images/screenshots/style-basic-v2.png +0 -0
  112. package/docsmd/images/screenshots/style-bright.png +0 -0
  113. package/docsmd/images/screenshots/style-dataviz-dark.png +0 -0
  114. package/docsmd/images/screenshots/style-hybrid.png +0 -0
  115. package/docsmd/images/screenshots/style-osm.png +0 -0
  116. package/docsmd/images/screenshots/style-outdoor.png +0 -0
  117. package/docsmd/images/screenshots/style-pastel.png +0 -0
  118. package/docsmd/images/screenshots/style-satellite.png +0 -0
  119. package/docsmd/images/screenshots/style-streets-v2-dark.png +0 -0
  120. package/docsmd/images/screenshots/style-streets-v2-light.png +0 -0
  121. package/docsmd/images/screenshots/style-streets-v2.png +0 -0
  122. package/docsmd/images/screenshots/style-toner.png +0 -0
  123. package/docsmd/images/screenshots/style-topo.png +0 -0
  124. package/docsmd/images/screenshots/style-topographique.png +0 -0
  125. package/docsmd/images/screenshots/style-voyager.png +0 -0
  126. package/docsmd/images/screenshots/style-winter.png +0 -0
  127. package/images/JS-logo.svg +0 -4
  128. package/images/TS-logo.svg +0 -6
  129. package/images/maptiler-logo.svg +0 -19
  130. package/images/maptiler-sdk-logo.afdesign +0 -0
  131. package/images/maptiler-sdk-logo.svg +0 -66
  132. package/images/screenshots/alps.gif +0 -0
  133. package/images/screenshots/grandcanyon.gif +0 -0
  134. package/images/screenshots/lang-arabic.png +0 -0
  135. package/images/screenshots/lang-hebrew.png +0 -0
  136. package/images/screenshots/multilang.gif +0 -0
  137. package/images/screenshots/static-bounded-europe-1024.png +0 -0
  138. package/images/screenshots/static-bounded-europe-2048.png +0 -0
  139. package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  140. package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  141. package/images/screenshots/static-with-path.png +0 -0
  142. package/images/screenshots/style-basic-v2.png +0 -0
  143. package/images/screenshots/style-bright.png +0 -0
  144. package/images/screenshots/style-dataviz-dark.png +0 -0
  145. package/images/screenshots/style-hybrid.png +0 -0
  146. package/images/screenshots/style-osm.png +0 -0
  147. package/images/screenshots/style-outdoor.png +0 -0
  148. package/images/screenshots/style-pastel.png +0 -0
  149. package/images/screenshots/style-satellite.png +0 -0
  150. package/images/screenshots/style-streets-v2-dark.png +0 -0
  151. package/images/screenshots/style-streets-v2-light.png +0 -0
  152. package/images/screenshots/style-streets-v2.png +0 -0
  153. package/images/screenshots/style-toner.png +0 -0
  154. package/images/screenshots/style-topo.png +0 -0
  155. package/images/screenshots/style-topographique.png +0 -0
  156. package/images/screenshots/style-voyager.png +0 -0
  157. package/images/screenshots/style-winter.png +0 -0
  158. 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);