https://github.com/dfpc-coe/mbtiles-offline
Download Slippy Map Tiles into an MBTiles file for offline use
https://github.com/dfpc-coe/mbtiles-offline
atak mbtiles tak tiles web-mapping
Last synced: about 1 month ago
JSON representation
Download Slippy Map Tiles into an MBTiles file for offline use
- Host: GitHub
- URL: https://github.com/dfpc-coe/mbtiles-offline
- Owner: dfpc-coe
- License: mit
- Created: 2025-10-02T14:10:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-02-03T17:21:47.000Z (5 months ago)
- Last Synced: 2026-02-04T06:22:48.206Z (5 months ago)
- Topics: atak, mbtiles, tak, tiles, web-mapping
- Language: TypeScript
- Homepage: https://mbtiles-offline.cloudtak.io/
- Size: 306 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@tak-ps/mbtiles-offline
Download Web maps into an offline MBTiles database.
## Usage
```javascript
import { MBTilesOffline } from '@tak-ps/mbtiles-offline';
const download = new MBTilesOffline({
name: 'My Map',
description: 'Offline satellite imagery',
version: '1.0.0',
bounds: [-108.39, 38.60, -108.30, 38.65],
minzoom: 0,
maxzoom: 14,
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
output: './satellite.mbtiles',
concurrency: 50
});
download.on('total', (total) => {
console.log(`Downloading ${total} tiles...`);
});
download.on('progress', (current) => {
console.log(`Progress: ${current}`);
});
download.on('error', (err) => {
console.error(err);
});
await download.start();
```
## Configuration
The `MBTilesOffline` constructor accepts the following options:
| Option | Type | Description |
|---|---|---|
| `bounds` | `[number, number, number, number]` | **Required** GeoJSON BBox `[minX, minY, maxX, maxY]` |
| `minzoom` | `number` | **Required** Minimum Zoom Level |
| `maxzoom` | `number` | **Required** Maximum Zoom Level |
| `url` | `string` | **Required** Tile URL Template. Must include `{z}`, `{x}`, `{y}` |
| `output` | `string` | **Required** Path to write the MBTiles database |
| `name` | `string` | Name of the tileset (metadata) |
| `description` | `string` | Description of the tileset (metadata) |
| `version` | `string` | Version of the tileset (metadata) |
| `concurrency` | `number` | Number of concurrent requests (Default: `Infinity`) |