Client-side slippy tile cache for map tiles, fonts, JSON styles, and sprites. Version 3.0.0 is the current stable release with an irregular release cadence. Provides simple store-based API (put, get, check, remove, drop) using IndexedDB or LevelDB. Lightweight alternative to tilelive-cache or Leaflet tile layers, focused on offline caching. Supports Blob/ArrayBuffer storage with key format [x, y, zoom].
npm install tile-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates all basic operations on the tile store: put, get, check, remove, and drop.
Use async/await or .then() for all operations.
Always provide an array of three integers.
Call tileCache.drop('store') to clear a store when needed.Use localStorage or dedicated JSON caching library for styles.
Use one of the allowed stores: 'tile', 'font', 'json', 'image'.
Pass key as an array like [0, 3, 5].
Use `import tileCache from 'tile-cache'` or `const tileCache = require('tile-cache')`.No dependency data recorded yet.