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(
|
||||
`WARN: PMTiles not in "openmaptiles" format. Serving raw data only...`,
|
||||
);
|
||||
config['data'][
|
||||
(metadata.id || 'mbtiles')
|
||||
.replace(/[?/:]/g, '_')
|
||||
] = {
|
||||
config['data'][(metadata.id || 'mbtiles').replace(/[?/:]/g, '_')] = {
|
||||
mbtiles: path.basename(inputfile),
|
||||
};
|
||||
}
|
||||
|
|
@ -201,10 +198,7 @@ const startWithInputFile = async (inputfile) => {
|
|||
console.log(
|
||||
`WARN: MBTiles not in "openmaptiles" format. Serving raw data only...`,
|
||||
);
|
||||
config['data'][
|
||||
(info.id || 'mbtiles')
|
||||
.replace(/[?/:]/g, '_')
|
||||
] = {
|
||||
config['data'][(info.id || 'mbtiles').replace(/[?/:]/g, '_')] = {
|
||||
mbtiles: path.basename(inputfile),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1257,8 +1257,17 @@ export const serve_rendered = {
|
|||
const y = parts[5].split('.')[0] | 0;
|
||||
const format = parts[5].split('.')[1];
|
||||
|
||||
if (typeof map.sources[sourceId] === 'string' && map.sources[sourceId].split('.').pop().toLowerCase() === 'pmtiles') {
|
||||
let tileinfo = await GetPMtilesTile(map.sources[sourceId], z, x, y);
|
||||
if (
|
||||
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 headers = tileinfo.header;
|
||||
if (data == undefined) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue