Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@codingspark/tiles-downloader
Advanced tools
[!IMPORTANT] This module is ESM only.
This module allows you to download tiles from a tile server. Therefore you can use it to download tiles from OpenStreetMap, etc. for offline use or caching.
npm install @codingspark/tiles-downloader
Generic tiles download using fetch
that works in browser and most server environments.
import path from "node:path";
import { downloadTiles } from "@codingspark/tiles-downloader";
await downloadTiles(
{
url: "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
zoomLevels: [14, 15, 16],
throttleConfig: { limit: 3, interval: 1000 },
bounds: {
minLat: 43.5704,
maxLat: 43.645,
minLon: 3.8095,
maxLon: 3.923,
},
},
async ({ x, y, z, buffer }) => {
const outputPath = path.join(
"./map",
z.toString(),
x.toString(),
`${y}.png`
);
console.log(`Writing tile ${z}/${x}/${y}`);
// Using bun but use anything you want to write the buffer to a file
Bun.write(outputPath, buffer);
}
);
This can be useful if you want to only get tiles for a specific need or you want to manage downloading tiles by yourself.
import { computeTiles } from "@codingspark/tiles-downloader";
const tiles = computeTiles({
bounds: {
minLat: 43.5704,
maxLat: 43.645,
minLon: 3.8095,
maxLon: 3.923,
},
zoomLevels: [14, 15, 16],
});
FAQs
A small library to download map tiles
The npm package @codingspark/tiles-downloader receives a total of 2 weekly downloads. As such, @codingspark/tiles-downloader popularity was classified as not popular.
We found that @codingspark/tiles-downloader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.