chore: compact arguments for renderOverlay and respondImage
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
This commit is contained in:
parent
345b831edd
commit
d9c2128ddf
1 changed files with 18 additions and 87 deletions
|
@ -573,19 +573,10 @@ export const serve_rendered = {
|
||||||
],
|
],
|
||||||
z,
|
z,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
return respondImage(
|
return respondImage(
|
||||||
options,
|
options, item, z, tileCenter[0], tileCenter[1], 0, 0, tileSize, tileSize, scale, format, res,
|
||||||
item,
|
|
||||||
z,
|
|
||||||
tileCenter[0],
|
|
||||||
tileCenter[1],
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
tileSize,
|
|
||||||
tileSize,
|
|
||||||
scale,
|
|
||||||
format,
|
|
||||||
res,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -641,35 +632,15 @@ export const serve_rendered = {
|
||||||
options,
|
options,
|
||||||
transformer,
|
transformer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const overlay = await renderOverlay(
|
const overlay = await renderOverlay(
|
||||||
z,
|
z, x, y, bearing, pitch, w, h, scale, paths, markers, req.query,
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
paths,
|
|
||||||
markers,
|
|
||||||
req.query,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
return respondImage(
|
return respondImage(
|
||||||
options,
|
options, item, z, x, y, bearing, pitch, w, h, scale, format, res, overlay, 'static',
|
||||||
item,
|
|
||||||
z,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
format,
|
|
||||||
res,
|
|
||||||
overlay,
|
|
||||||
'static',
|
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
next(e);
|
next(e);
|
||||||
|
@ -723,34 +694,15 @@ export const serve_rendered = {
|
||||||
options,
|
options,
|
||||||
transformer,
|
transformer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const overlay = await renderOverlay(
|
const overlay = await renderOverlay(
|
||||||
z,
|
z, x, y, bearing, pitch, w, h, scale, paths, markers, req.query,
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
paths,
|
|
||||||
markers,
|
|
||||||
req.query,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
return respondImage(
|
return respondImage(
|
||||||
options,
|
options, item, z, x, y, bearing, pitch, w, h, scale, format, res, overlay, 'static',
|
||||||
item,
|
|
||||||
z,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
format,
|
|
||||||
res,
|
|
||||||
overlay,
|
|
||||||
'static',
|
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
next(e);
|
next(e);
|
||||||
|
@ -856,35 +808,14 @@ export const serve_rendered = {
|
||||||
const x = center[0];
|
const x = center[0];
|
||||||
const y = center[1];
|
const y = center[1];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const overlay = await renderOverlay(
|
const overlay = await renderOverlay(
|
||||||
z,
|
z, x, y, bearing, pitch, w, h, scale, paths, markers, req.query,
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
paths,
|
|
||||||
markers,
|
|
||||||
req.query,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
return respondImage(
|
return respondImage(
|
||||||
options,
|
options, item, z, x, y, bearing, pitch, w, h, scale, format, res, overlay, 'static',
|
||||||
item,
|
|
||||||
z,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bearing,
|
|
||||||
pitch,
|
|
||||||
w,
|
|
||||||
h,
|
|
||||||
scale,
|
|
||||||
format,
|
|
||||||
res,
|
|
||||||
overlay,
|
|
||||||
'static',
|
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
next(e);
|
next(e);
|
||||||
|
|
Loading…
Reference in a new issue