fix: lint
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
371e757e5b
commit
08b3a943a6
2 changed files with 24 additions and 21 deletions
10
src/main.js
10
src/main.js
|
|
@ -143,10 +143,7 @@ const startWithInputFile = async (inputfile) => {
|
||||||
console.log(
|
console.log(
|
||||||
`WARN: PMTiles not in "openmaptiles" format. Serving raw data only...`,
|
`WARN: PMTiles not in "openmaptiles" format. Serving raw data only...`,
|
||||||
);
|
);
|
||||||
config['data'][
|
config['data'][(metadata.id || 'mbtiles').replace(/[?/:]/g, '_')] = {
|
||||||
(metadata.id || 'mbtiles')
|
|
||||||
.replace(/[?/:]/g, '_')
|
|
||||||
] = {
|
|
||||||
mbtiles: path.basename(inputfile),
|
mbtiles: path.basename(inputfile),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -201,10 +198,7 @@ const startWithInputFile = async (inputfile) => {
|
||||||
console.log(
|
console.log(
|
||||||
`WARN: MBTiles not in "openmaptiles" format. Serving raw data only...`,
|
`WARN: MBTiles not in "openmaptiles" format. Serving raw data only...`,
|
||||||
);
|
);
|
||||||
config['data'][
|
config['data'][(info.id || 'mbtiles').replace(/[?/:]/g, '_')] = {
|
||||||
(info.id || 'mbtiles')
|
|
||||||
.replace(/[?/:]/g, '_')
|
|
||||||
] = {
|
|
||||||
mbtiles: path.basename(inputfile),
|
mbtiles: path.basename(inputfile),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1257,8 +1257,17 @@ export const serve_rendered = {
|
||||||
const y = parts[5].split('.')[0] | 0;
|
const y = parts[5].split('.')[0] | 0;
|
||||||
const format = parts[5].split('.')[1];
|
const format = parts[5].split('.')[1];
|
||||||
|
|
||||||
if (typeof map.sources[sourceId] === 'string' && map.sources[sourceId].split('.').pop().toLowerCase() === 'pmtiles') {
|
if (
|
||||||
let tileinfo = await GetPMtilesTile(map.sources[sourceId], z, x, y);
|
typeof map.sources[sourceId] === 'string' &&
|
||||||
|
map.sources[sourceId].split('.').pop().toLowerCase() ===
|
||||||
|
'pmtiles'
|
||||||
|
) {
|
||||||
|
let tileinfo = await GetPMtilesTile(
|
||||||
|
map.sources[sourceId],
|
||||||
|
z,
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
);
|
||||||
let data = tileinfo.data;
|
let data = tileinfo.data;
|
||||||
let headers = tileinfo.header;
|
let headers = tileinfo.header;
|
||||||
if (data == undefined) {
|
if (data == undefined) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue