cleanup unneeded changes
This commit is contained in:
parent
32606113c0
commit
ff4ab84159
1 changed files with 1 additions and 14 deletions
|
@ -453,8 +453,6 @@ const respondImage = async (
|
||||||
overlay = null,
|
overlay = null,
|
||||||
mode = 'tile',
|
mode = 'tile',
|
||||||
) => {
|
) => {
|
||||||
console.log(lat);
|
|
||||||
console.log(lon);
|
|
||||||
if (
|
if (
|
||||||
Math.abs(lon) > 180 ||
|
Math.abs(lon) > 180 ||
|
||||||
Math.abs(lat) > 85.06 ||
|
Math.abs(lat) > 85.06 ||
|
||||||
|
@ -748,9 +746,7 @@ async function handleStaticRequest(
|
||||||
} = req.params;
|
} = req.params;
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log(
|
console.log(
|
||||||
`Handling static request for: /styles/${id}/static/${raw ? raw + '/' : ''}${staticType}${widthAndHeight ? '/' + widthAndHeight : ''}${
|
`Handling static request for: /styles/${id}/static/${raw ? raw + '/' : ''}${staticType}${widthAndHeight ? '/' + widthAndHeight : ''}${scaleParam ? '@' + scaleParam : ''}.${format}`,
|
||||||
scaleParam ? '@' + scaleParam : ''
|
|
||||||
}.${format}`,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
console.log(req.params);
|
console.log(req.params);
|
||||||
|
@ -832,11 +828,6 @@ async function handleStaticRequest(
|
||||||
const miny = parseFloat(staticTypeMatch.groups.miny) || 0;
|
const miny = parseFloat(staticTypeMatch.groups.miny) || 0;
|
||||||
const maxx = parseFloat(staticTypeMatch.groups.maxx) || 0;
|
const maxx = parseFloat(staticTypeMatch.groups.maxx) || 0;
|
||||||
const maxy = parseFloat(staticTypeMatch.groups.maxy) || 0;
|
const maxy = parseFloat(staticTypeMatch.groups.maxy) || 0;
|
||||||
if (isNaN(minx) || isNaN(miny) || isNaN(maxx) || isNaN(maxy)) {
|
|
||||||
return res
|
|
||||||
.status(400)
|
|
||||||
.send('Invalid bounding box provided in staticType parameter');
|
|
||||||
}
|
|
||||||
const bbox = [minx, miny, maxx, maxy];
|
const bbox = [minx, miny, maxx, maxy];
|
||||||
let center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];
|
let center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];
|
||||||
|
|
||||||
|
@ -854,10 +845,6 @@ async function handleStaticRequest(
|
||||||
center = transformer(center);
|
center = transformer(center);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(center[0]) > 180 || Math.abs(center[1]) > 85.06) {
|
|
||||||
return res.status(400).send('Invalid center');
|
|
||||||
}
|
|
||||||
|
|
||||||
const z = calcZForBBox(bbox, parsedWidth, parsedHeight, req.query);
|
const z = calcZForBBox(bbox, parsedWidth, parsedHeight, req.query);
|
||||||
const x = center[0];
|
const x = center[0];
|
||||||
const y = center[1];
|
const y = center[1];
|
||||||
|
|
Loading…
Reference in a new issue