mapcachetools 2.1.0 → 2.2.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/README.md +6 -5
- package/bin/mapcache_download.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,25 +39,25 @@ Watch a demo video showcasing the tool:
|
|
|
39
39
|
Download map tiles for a geographic area defined by two coordinates (`lat1,lng1` to `lat2,lng2`), a zoom range, and an output folder. Run the script with:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
node
|
|
42
|
+
node mapcache_download.js --lat1=<lat> --lng1=<lng> --lat2=<lat> --lng2=<lng> --zin=<max_zoom> --folder=<output_folder> [options]
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Example: Download OSM Tiles
|
|
46
46
|
Download OpenStreetMap tiles for a small area with zoom levels 0 to 14:
|
|
47
47
|
```bash
|
|
48
|
-
node
|
|
48
|
+
node mapcache_download.js --lat1=40.7128 --lng1=-74.0060 --lat2=40.7228 --lng2=-73.9960 --zin=14 --zout=0 --folder=./site/cachedMaps
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Example: Download Mapbox Satellite Tiles
|
|
52
52
|
Download Mapbox satellite tiles (saved as PNG, requires a Mapbox access token):
|
|
53
53
|
```bash
|
|
54
|
-
node
|
|
54
|
+
node mapcache_download.js --lat1=40.7128 --lng1=-74.0060 --lat2=40.7228 --lng2=-73.9960 --zin=14 --folder=./site/cachedMaps --provider=1 --token=pk.eyJ1IjoibWhlZm55IiwiYSI6ImNrZW84Nm9rYTA2ZWgycm9mdmNscmFxYzcifQ.c-zxDjXCthXmRsErPzKhbQ
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Example: Download Mapbox Terrain RGB Tiles
|
|
58
58
|
Download Mapbox terrain RGB tiles for elevation data:
|
|
59
59
|
```bash
|
|
60
|
-
node
|
|
60
|
+
node mapcache_download.js --lat1=40.7128 --lng1=-74.0060 --lat2=40.7228 --lng2=-73.9960 --zin=14 --folder=./site/cachedMaps --provider=2 --token=pk.eyJ1IjoibWhlZm55IiwiYSI6ImNrZW84Nm9rYTA2ZWgycm9mdmNscmFxYzcifQ.c-zxDjXCthXmRsErPzKhbQ
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### Options
|
|
@@ -119,4 +119,5 @@ Obtain a Mapbox token from [Mapbox Account](https://account.mapbox.com/).
|
|
|
119
119
|
|
|
120
120
|
## Disclaimer
|
|
121
121
|
|
|
122
|
-
Please review the terms and conditions of your chosen map provider (e.g., [OpenStreetMap](https://www.openstreetmap.org/copyright), [Mapbox](https://www.mapbox.com/tos)). The author assumes no liability for any incidental, consequential, or other damages arising from the use of this tool.
|
|
122
|
+
Please review the terms and conditions of your chosen map provider (e.g., [OpenStreetMap](https://www.openstreetmap.org/copyright), [Mapbox](https://www.mapbox.com/tos)). The author assumes no liability for any incidental, consequential, or other damages arising from the use of this tool.
|
|
123
|
+
|
package/bin/mapcache_download.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- Force redownload option.
|
|
12
12
|
- Improved error handling and logging.
|
|
13
13
|
|
|
14
|
-
Usage: node
|
|
14
|
+
Usage: node mapcache_download.js --lat1=<lat> --lng1=<lng> --lat2=<lat> --lng2=<lng> --zin=<max_zoom> [options]
|
|
15
15
|
|
|
16
16
|
Run with --help for full options.
|
|
17
17
|
*/
|
|
@@ -226,7 +226,7 @@ function fn_handle_arguments() {
|
|
|
226
226
|
(v_pjson.version || "1.0.0") +
|
|
227
227
|
c_colors.Reset
|
|
228
228
|
);
|
|
229
|
-
console.log(c_colors.BSuccess + "Usage: node
|
|
229
|
+
console.log(c_colors.BSuccess + "Usage: node mapcache_download.js --lat1=<lat> --lng1=<lng> --lat2=<lat> --lng2=<lng> --zin=<max_zoom> [options]" + c_colors.Reset);
|
|
230
230
|
console.log(c_colors.BSuccess + "--lat1, --lng1: Start coordinates (required)" + c_colors.Reset);
|
|
231
231
|
console.log(c_colors.BSuccess + "--lat2, --lng2: End coordinates (required)" + c_colors.Reset);
|
|
232
232
|
console.log(c_colors.BSuccess + "--zout: Min zoom (default: 0)" + c_colors.Reset);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mapcachetools",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "A Node.js tool to download and cache map tiles (OSM, Mapbox Satellite, Mapbox Terrain RGB) as PNG images for offline use in mapping applications. Use at your own risk and comply with provider terms.",
|
|
5
5
|
"main": "bin/mapcache_download.js",
|
|
6
6
|
"bin": {
|