mirror of
https://github.com/maptiler/tileserver-gl.git
synced 2024-08-16 07:20:24 +03:00
chore: remove duplicated field names to simplify code
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
This commit is contained in:
parent
d9c2128ddf
commit
f69a2339b8
@ -68,8 +68,8 @@ const StartServer = (configPath, config) => {
|
||||
publicUrl += '/';
|
||||
}
|
||||
return server({
|
||||
configPath: configPath,
|
||||
config: config,
|
||||
configPath,
|
||||
config,
|
||||
bind: opts.bind,
|
||||
port: opts.port,
|
||||
cors: opts.cors,
|
||||
@ -77,7 +77,7 @@ const StartServer = (configPath, config) => {
|
||||
silent: opts.silent,
|
||||
logFile: opts.log_file,
|
||||
logFormat: opts.log_format,
|
||||
publicUrl: publicUrl,
|
||||
publicUrl,
|
||||
});
|
||||
};
|
||||
|
||||
@ -215,7 +215,7 @@ const StartWithInputFile = async (inputFile) => {
|
||||
config['styles'][styleName] = {
|
||||
style: styleFileRel,
|
||||
tilejson: {
|
||||
bounds: bounds,
|
||||
bounds,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ function createEmptyResponse(format, color, callback) {
|
||||
raw: {
|
||||
width: 1,
|
||||
height: 1,
|
||||
channels: channels,
|
||||
channels,
|
||||
},
|
||||
})
|
||||
.toFormat(format)
|
||||
@ -405,10 +405,10 @@ const respondImage = (
|
||||
const params = {
|
||||
zoom: mlglZ,
|
||||
center: [lon, lat],
|
||||
bearing: bearing,
|
||||
pitch: pitch,
|
||||
width: width,
|
||||
height: height,
|
||||
bearing,
|
||||
pitch,
|
||||
width,
|
||||
height,
|
||||
};
|
||||
|
||||
if (z === 0) {
|
||||
@ -856,8 +856,8 @@ export const serve_rendered = {
|
||||
const createPool = (ratio, mode, min, max) => {
|
||||
const createRenderer = (ratio, createCallback) => {
|
||||
const renderer = new mlgl.Map({
|
||||
mode: mode,
|
||||
ratio: ratio,
|
||||
mode,
|
||||
ratio,
|
||||
request: async (req, callback) => {
|
||||
const protocol = req.url.split(':')[0];
|
||||
// console.log('Handling request:', req);
|
||||
@ -1016,8 +1016,8 @@ export const serve_rendered = {
|
||||
createCallback(null, renderer);
|
||||
};
|
||||
return new advancedPool.Pool({
|
||||
min: min,
|
||||
max: max,
|
||||
min,
|
||||
max,
|
||||
create: createRenderer.bind(null, ratio),
|
||||
destroy: (renderer) => {
|
||||
renderer.release();
|
||||
@ -1114,9 +1114,9 @@ export const serve_rendered = {
|
||||
|
||||
let inputFile;
|
||||
const DataInfo = dataResolver(dataId);
|
||||
if (DataInfo.inputfile) {
|
||||
inputFile = DataInfo.inputfile;
|
||||
source_type = DataInfo.filetype;
|
||||
if (DataInfo.inputFile) {
|
||||
inputFile = DataInfo.inputFile;
|
||||
source_type = DataInfo.fileType;
|
||||
} else {
|
||||
console.error(`ERROR: data "${inputFile}" not found!`);
|
||||
process.exit(1);
|
||||
|
@ -253,7 +253,7 @@ function start(opts) {
|
||||
inputFile = path.resolve(options.paths[fileType], inputFile);
|
||||
}
|
||||
|
||||
return { inputfile: inputFile, filetype: fileType };
|
||||
return { inputFile, fileType };
|
||||
},
|
||||
),
|
||||
);
|
||||
@ -344,7 +344,7 @@ function start(opts) {
|
||||
result.push({
|
||||
version: styleJSON.version,
|
||||
name: styleJSON.name,
|
||||
id: id,
|
||||
id,
|
||||
url: `${getPublicUrl(
|
||||
opts.publicUrl,
|
||||
req,
|
||||
@ -630,9 +630,9 @@ function start(opts) {
|
||||
enableShutdown(server);
|
||||
|
||||
return {
|
||||
app: app,
|
||||
server: server,
|
||||
startupPromise: startupPromise,
|
||||
app,
|
||||
server,
|
||||
startupPromise,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user