diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 78036f0d..d1996b6b 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -2,10 +2,6 @@ const fqdn = require('@carto/fqdn-sync'); var _ = require('underscore'); var OverviewsQueryRewriter = require('./utils/overviews_query_rewriter'); -var overviewsQueryRewriter = new OverviewsQueryRewriter({ - zoom_level: 'CDB_ZoomFromScale(!scale_denominator!)' -}); - var rendererConfig = _.defaults(global.environment.renderer || {}, { cache_ttl: 60000, // milliseconds statsInterval: 60000, @@ -27,10 +23,17 @@ var rendererConfig = _.defaults(global.environment.renderer || {}, { }, limits: {} }, - http: {} + http: {}, + mvt: {} }); -rendererConfig.mapnik.queryRewriter = overviewsQueryRewriter; +rendererConfig.mapnik.queryRewriter = new OverviewsQueryRewriter({ + zoom_level: 'CDB_ZoomFromScale(!scale_denominator!)' +}); + +rendererConfig.mvt.queryRewriter = new OverviewsQueryRewriter({ + zoom_level: 'CDB_ZoomFromScale(!scale_denominator!)' +}); // Perform keyword substitution in statsd // See https://github.com/CartoDB/Windshaft-cartodb/issues/153