New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tile-cache

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tile-cache

Client side splippy tile cache

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

NPM version Build Status Dependency Status

tile-cache

Client side splippy tile cache

Install

$ npm install --save tile-cache

Usage

The following collections/stores are provided by tile cache:

  • tile - map tiles
  • font - glyphs needed to render labels
  • json - styles and other json data
  • image - sprites

tile-cache methods take a store name as the first parameter. The examples below us tile store.

const tileCache = require('tile-cache');

const key = [0, 3, 5]; // x, y, zoom
let tile; // Blob or ArrayBuffer representing tile

await tileCache.put('tile', key, tile);
// tile is now in cache

tile = await tileCache.get('tile', key);
// tile retrieved

const inCache = await tileCache.check('tile', key);
// inCache is truthy is tile was in cache

await tileCache.remove('tile', key);
// specific tile is removed from cache

await tileCache.drop('tile');

License

MIT © Damian Krzeminski

Keywords

tile-cache

FAQs

Package last updated on 31 Jan 2026

Did you know?

Socket

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.

Install

Related posts