mapcachetools 2.2.3 → 2.2.4

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.
@@ -32,7 +32,7 @@ const MAX_LATITUDE = 85.0511287798;
32
32
  const R_MINOR = 6356752.314245179; // Not used, but kept for completeness.
33
33
 
34
34
  // Default values
35
- const DEFAULT_PROVIDER = 0; // 0: OSM, 1: Mapbox Satellite, 2: Mapbox Terrain RGB
35
+ const DEFAULT_PROVIDER = 0; // 0: OSM, 1: Mapbox Satellite, 2: Mapbox Terrain RGB, 3: Stadiamaps
36
36
  const DEFAULT_CONCURRENCY = 5; // Safe default to avoid rate limits
37
37
  const DEFAULT_RETRIES = 3;
38
38
  const DEFAULT_ZOUT = 0;
@@ -149,6 +149,8 @@ function getTileUrlAndFilename(i, j, zoom) {
149
149
  // Mapbox Terrain RGB
150
150
  url = `https://api.mapbox.com/v4/mapbox.terrain-rgb/${zoom}/${i}/${j}.png?access_token=${TOKEN}`;
151
151
  typePrefix = "terrain";
152
+ } else if (map_provider == 3) {
153
+ url = `https://tiles.stadiamaps.com/tiles/alidade_satellite/${zoom}/${i}/${j}.jpg?api_key=${TOKEN}`;
152
154
  } else {
153
155
  // OpenStreetMap
154
156
  url = `https://tile.openstreetmap.org/${zoom}/${i}/${j}.png`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapcachetools",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
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": {