mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-25 09:33:48 +01:00
The NPM package mbtiles got deprecated in favour of @mapbox/mbtiles
This commit is contained in:
parent
cf4731682e
commit
4546a99a55
@ -16,10 +16,10 @@ const config = require('./config');
|
|||||||
|
|
||||||
// https://github.com/mapbox/node-mbtiles has native build dependencies (sqlite3)
|
// https://github.com/mapbox/node-mbtiles has native build dependencies (sqlite3)
|
||||||
// To maximize MapSCII’s compatibility, MBTiles support must be manually added via
|
// To maximize MapSCII’s compatibility, MBTiles support must be manually added via
|
||||||
// $> npm install -g mbtiles
|
// $> npm install -g @mapbox/mbtiles
|
||||||
let MBTiles = null;
|
let MBTiles = null;
|
||||||
try {
|
try {
|
||||||
MBTiles = require('mbtiles');
|
MBTiles = require('@mapbox/mbtiles');
|
||||||
} catch (err) {void 0;}
|
} catch (err) {void 0;}
|
||||||
|
|
||||||
const modes = {
|
const modes = {
|
||||||
@ -49,7 +49,7 @@ class TileSource {
|
|||||||
|
|
||||||
} else if (this.source.endsWith('.mbtiles')) {
|
} else if (this.source.endsWith('.mbtiles')) {
|
||||||
if (!MBTiles) {
|
if (!MBTiles) {
|
||||||
throw new Error('MBTiles support must be installed with following command: \'npm install -g mbtiles\'');
|
throw new Error('MBTiles support must be installed with following command: \'npm install -g @mapbox/mbtiles\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mode = modes.MBTiles;
|
this.mode = modes.MBTiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user