Rename center and bbox middlewares
This commit is contained in:
@@ -124,7 +124,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
allowQueryParams(['layer']),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
center(this.previewBackend),
|
||||
getPreviewImageByCenter(this.previewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
getAffectedTables(this.layergroupAffectedTables, this.pgConnection),
|
||||
@@ -140,7 +140,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
allowQueryParams(['layer']),
|
||||
this.prepareContext,
|
||||
getMapStoreMapConfigProvider(this.mapStore, this.userLimitsApi, forcedFormat),
|
||||
bbox(this.previewBackend),
|
||||
getPreviewImageByBoundingBox(this.previewBackend),
|
||||
setCacheControlHeader(),
|
||||
setLastModifiedHeader(),
|
||||
getAffectedTables(this.layergroupAffectedTables, this.pgConnection),
|
||||
@@ -422,8 +422,8 @@ function getTile (tileBackend, profileLabel = 'tile') {
|
||||
};
|
||||
}
|
||||
|
||||
function center (previewBackend) {
|
||||
return function centerMiddleware (req, res, next) {
|
||||
function getPreviewImageByCenter (previewBackend) {
|
||||
return function getPreviewImageByCenterMiddleware (req, res, next) {
|
||||
const width = +req.params.width;
|
||||
const height = +req.params.height;
|
||||
const zoom = +req.params.z;
|
||||
@@ -457,8 +457,8 @@ function center (previewBackend) {
|
||||
};
|
||||
}
|
||||
|
||||
function bbox (previewBackend) {
|
||||
return function bboxMiddleware (req, res, next) {
|
||||
function getPreviewImageByBoundingBox (previewBackend) {
|
||||
return function getPreviewImageByBoundingBoxMiddleware (req, res, next) {
|
||||
const width = +req.params.width;
|
||||
const height = +req.params.height;
|
||||
const bounds = {
|
||||
|
||||
Reference in New Issue
Block a user