@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.
- package/package.json +1 -1
- package/readme.md +11 -11
- package/docs/.nojekyll +0 -1
- package/docs/assets/custom.css +0 -118
- package/docs/assets/highlight.css +0 -134
- package/docs/assets/main.js +0 -54
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1257
- package/docs/classes/Map.html +0 -273
- package/docs/classes/Point.html +0 -549
- package/docs/classes/SdkConfig.html +0 -188
- package/docs/demos/maptiler-sdk.css +0 -147
- package/docs/demos/maptiler-sdk.umd.js +0 -3287
- package/docs/demos/simple.html +0 -63
- package/docs/functions/addProtocol.html +0 -146
- package/docs/functions/clearPrewarmedResources.html +0 -92
- package/docs/functions/clearStorage.html +0 -124
- package/docs/functions/getRTLTextPluginStatus.html +0 -92
- package/docs/functions/prewarm.html +0 -92
- package/docs/functions/removeProtocol.html +0 -106
- package/docs/functions/setRTLTextPlugin.html +0 -112
- package/docs/functions/supported.html +0 -97
- package/docs/images/JS-logo.svg +0 -4
- package/docs/images/TS-logo.svg +0 -6
- package/docs/images/maptiler-logo.svg +0 -19
- package/docs/images/maptiler-sdk-logo.afdesign +0 -0
- package/docs/images/maptiler-sdk-logo.svg +0 -66
- package/docs/images/screenshots/alps.gif +0 -0
- package/docs/images/screenshots/grandcanyon.gif +0 -0
- package/docs/images/screenshots/lang-arabic.png +0 -0
- package/docs/images/screenshots/lang-hebrew.png +0 -0
- package/docs/images/screenshots/multilang.gif +0 -0
- package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docs/images/screenshots/static-with-path.png +0 -0
- package/docs/images/screenshots/style-basic-v2.png +0 -0
- package/docs/images/screenshots/style-bright.png +0 -0
- package/docs/images/screenshots/style-dataviz-dark.png +0 -0
- package/docs/images/screenshots/style-hybrid.png +0 -0
- package/docs/images/screenshots/style-osm.png +0 -0
- package/docs/images/screenshots/style-outdoor.png +0 -0
- package/docs/images/screenshots/style-pastel.png +0 -0
- package/docs/images/screenshots/style-satellite.png +0 -0
- package/docs/images/screenshots/style-streets-v2-dark.png +0 -0
- package/docs/images/screenshots/style-streets-v2-light.png +0 -0
- package/docs/images/screenshots/style-streets-v2.png +0 -0
- package/docs/images/screenshots/style-toner.png +0 -0
- package/docs/images/screenshots/style-topo.png +0 -0
- package/docs/images/screenshots/style-topographique.png +0 -0
- package/docs/images/screenshots/style-voyager.png +0 -0
- package/docs/images/screenshots/style-winter.png +0 -0
- package/docs/index.html +0 -601
- package/docs/modules.html +0 -142
- package/docs/types/LanguageKey.html +0 -90
- package/docs/types/LanguageString.html +0 -90
- package/docs/types/MapOptions.html +0 -90
- package/docs/types/Matrix2.html +0 -90
- package/docs/types/Unit.html +0 -88
- package/docs/variables/AJAXError.html +0 -88
- package/docs/variables/AttributionControl.html +0 -88
- package/docs/variables/CanvasSource.html +0 -88
- package/docs/variables/Evented.html +0 -88
- package/docs/variables/FullscreenControl.html +0 -88
- package/docs/variables/GeoJSONSource.html +0 -88
- package/docs/variables/GeolocateControl.html +0 -88
- package/docs/variables/GeolocationType.html +0 -95
- package/docs/variables/ImageSource.html +0 -88
- package/docs/variables/Language.html +0 -249
- package/docs/variables/LngLat.html +0 -88
- package/docs/variables/LngLatBounds.html +0 -88
- package/docs/variables/LogoControl.html +0 -88
- package/docs/variables/Marker.html +0 -88
- package/docs/variables/MercatorCoordinate.html +0 -88
- package/docs/variables/NavigationControl.html +0 -88
- package/docs/variables/Popup.html +0 -88
- package/docs/variables/RasterDEMTileSource.html +0 -88
- package/docs/variables/RasterTileSource.html +0 -88
- package/docs/variables/ScaleControl.html +0 -88
- package/docs/variables/Style.html +0 -88
- package/docs/variables/TerrainControl.html +0 -88
- package/docs/variables/VectorTileSource.html +0 -88
- package/docs/variables/VideoSource.html +0 -88
- package/docs/variables/config.html +0 -88
- package/docs/variables/maxParallelImageRequests.html +0 -88
- package/docs/variables/version.html +0 -88
- package/docs/variables/workerCount.html +0 -88
- package/docs/variables/workerUrl.html +0 -88
- package/docsmd/.nojekyll +0 -1
- package/docsmd/README.md +0 -710
- package/docsmd/assets/custom.css +0 -118
- package/docsmd/classes/Map.md +0 -292
- package/docsmd/classes/Point.md +0 -603
- package/docsmd/classes/SdkConfig.md +0 -186
- package/docsmd/images/JS-logo.svg +0 -4
- package/docsmd/images/TS-logo.svg +0 -6
- package/docsmd/images/maptiler-logo.svg +0 -19
- package/docsmd/images/maptiler-sdk-logo.afdesign +0 -0
- package/docsmd/images/maptiler-sdk-logo.svg +0 -66
- package/docsmd/images/screenshots/alps.gif +0 -0
- package/docsmd/images/screenshots/grandcanyon.gif +0 -0
- package/docsmd/images/screenshots/lang-arabic.png +0 -0
- package/docsmd/images/screenshots/lang-hebrew.png +0 -0
- package/docsmd/images/screenshots/multilang.gif +0 -0
- package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docsmd/images/screenshots/static-with-path.png +0 -0
- package/docsmd/images/screenshots/style-basic-v2.png +0 -0
- package/docsmd/images/screenshots/style-bright.png +0 -0
- package/docsmd/images/screenshots/style-dataviz-dark.png +0 -0
- package/docsmd/images/screenshots/style-hybrid.png +0 -0
- package/docsmd/images/screenshots/style-osm.png +0 -0
- package/docsmd/images/screenshots/style-outdoor.png +0 -0
- package/docsmd/images/screenshots/style-pastel.png +0 -0
- package/docsmd/images/screenshots/style-satellite.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2-dark.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2-light.png +0 -0
- package/docsmd/images/screenshots/style-streets-v2.png +0 -0
- package/docsmd/images/screenshots/style-toner.png +0 -0
- package/docsmd/images/screenshots/style-topo.png +0 -0
- package/docsmd/images/screenshots/style-topographique.png +0 -0
- package/docsmd/images/screenshots/style-voyager.png +0 -0
- package/docsmd/images/screenshots/style-winter.png +0 -0
- package/images/JS-logo.svg +0 -4
- package/images/TS-logo.svg +0 -6
- package/images/maptiler-logo.svg +0 -19
- package/images/maptiler-sdk-logo.afdesign +0 -0
- package/images/maptiler-sdk-logo.svg +0 -66
- package/images/screenshots/alps.gif +0 -0
- package/images/screenshots/grandcanyon.gif +0 -0
- package/images/screenshots/lang-arabic.png +0 -0
- package/images/screenshots/lang-hebrew.png +0 -0
- package/images/screenshots/multilang.gif +0 -0
- package/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/images/screenshots/static-with-path.png +0 -0
- package/images/screenshots/style-basic-v2.png +0 -0
- package/images/screenshots/style-bright.png +0 -0
- package/images/screenshots/style-dataviz-dark.png +0 -0
- package/images/screenshots/style-hybrid.png +0 -0
- package/images/screenshots/style-osm.png +0 -0
- package/images/screenshots/style-outdoor.png +0 -0
- package/images/screenshots/style-pastel.png +0 -0
- package/images/screenshots/style-satellite.png +0 -0
- package/images/screenshots/style-streets-v2-dark.png +0 -0
- package/images/screenshots/style-streets-v2-light.png +0 -0
- package/images/screenshots/style-streets-v2.png +0 -0
- package/images/screenshots/style-toner.png +0 -0
- package/images/screenshots/style-topo.png +0 -0
- package/images/screenshots/style-topographique.png +0 -0
- package/images/screenshots/style-voyager.png +0 -0
- package/images/screenshots/style-winter.png +0 -0
- 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);
|