tm

tiler-mbtiles

A map tile reader for mapbox mbtiles

Showing:

Popularity

Downloads/wk

1

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

227.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

tiler-mbtiles

Circle CI

A nodejs map tile reader for mapbox mbtiles format.

Introduction

This is a map tile file reader for mapbox's mbtiles in XYZ schema.

This link introduces what is mbtiles.

Developed based on mapbox's node-mbtiles

The test is based on the test materials from node-mbtiles.

See Also

tiler-xyz: A nodejs map tile file reader coordinating by X,Y,Z

tiler-arcgis-xyz: A nodejs map tile reader for exploded tiles by ESRI ArcGIS

tiler-arcgis-compact: A nodejs map tile reader for compact tiles by ESRI ArcGIS

Install

npm install tiler-mbtiles

Usage

var Tiler = require('tiler-mbtiles');
//path of the mbtiles file
//because it needs time to load mbtiles, the callback will be called when the tiler is ready
var tiler = new Tiler(__dirname+'/test/plain_1.mbtiles', function(error) {
    if (error) {
        throw error;
    }
    tiler.getTile(0, 0, 1, function(error, tile) {
        if (error) {
            throw error;
        }
        assert.ok(tile);        
        assert.ok(!isNaN(Date.parse(tile.lastModified)));
        fs.writeFileSync('1_0_0.png', tile.data);            
    });
});

//An error will be thrown because the tiler is not ready.
//tiler.getTile(..)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial