-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
36 lines (34 loc) · 1.18 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var path = require('path');
class ExportTilesPlugin {
constructor(config) {
config.commands.export.option('minZoom', {
help: 'Min zoom to be considered for export',
metavar: 'INT',
default: 0
});
config.commands.export.option('maxZoom', {
help: 'Max zoom to be considered for export',
metavar: 'INT',
default: 18
});
config.commands.export.option('tileFormat', {
help: 'Format for tiles (png, jpeg, etc.)',
default: 'png'
});
config.commands.export.option('tileSize', {
help: 'Format for tiles (png, jpeg, etc.)',
metavar: 'INT',
default: 256
});
config.commands.export.option('workers', {
help: 'Number of workers to run [Default: number of CPUs]',
metavar: 'INT'
});
config.commands.export.option('overwrite', {
flag: true,
help: 'Overwrite existing tiles instead of skiping.'
});
config.registerExporter('tiles', path.join(__dirname, 'Export.js'));
}
}
exports = module.exports = { Plugin: ExportTilesPlugin }