1.1.6 • Published 3 months ago
tile-cache v1.1.6
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.
var tileCache = require('tile-cache');
var key = [0, 3, 5]; // x, y, zoom
var tile; // Blob or ArrayBuffer representing tile
tileCache.put('tile', key, tile, function(err) {
// tile is now in cache
});
tileCache.get('tile', key, function(err, tile) {
// tile retrieved
});
tileCache.check('tile', key, function(err, inCache) {
// inCache is truthy is tile was in cache
});
tileCache.remove('tile', key, function(err) {
// specific tile is removed from cache
});
tileCache.drop('tile', function(err, tile) {
// all tiles are removed from cache
});
License
MIT © Damian Krzeminski
1.1.6
3 months ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
5 years ago
1.1.2
6 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.4.1
7 years ago
0.4.0
7 years ago
0.3.2
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.0
7 years ago
0.0.1
7 years ago