We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just to document for now (no action needed):
diff --git a/renderer.js b/renderer.js index 73c8b02..279be48 100644 --- a/renderer.js +++ b/renderer.js @@ -5,7 +5,7 @@ var util = require('util'); var Pool = require('./pool'); // Increase number of threads to 1.5x the number of logical CPUs. -var threads = require('os').cpus().length + 4; +var threads = 16;//require('os').cpus().length + 4; console.warn('Using %d threads', threads); require('eio').setMinParallel(threads); @@ -19,7 +19,7 @@ module.exports = function(args) { var maps = new Pool(function() { var map = new mapnik.Map(256, 256); map.bufferSize = args.bufferSize; - map.load(args.stylesheet, { + /*map.load(args.stylesheet, { strict: false, base: path.dirname(args.stylesheet) }, function(err, map) { @@ -29,14 +29,20 @@ module.exports = function(args) { util.print('\rCreating map objects (' + created + '/' + args.concurrency + ')...'); maps.release(map); }); + */ + map.loadSync(args.stylesheet); + map.zoomAll(); + created++; + util.print('\rCreating map objects (' + created + '/' + args.concurrency + ')...'); + maps.release(map); }, args.concurrency); return function(query, callback) { query.width = +query.width || 256; query.height = +query.height || 256; - if (query.width < 1 || query.width > 2048 || query.height < 1 || query.height > 2048) { + /*if (query.width < 1 || query.width > 2048 || query.height < 1 || query.height > 2048) { return callback(new Error('Invalid size: ' + query.width + '×' + query.height)); - } + }*/ var bbox = query.bbox ? query.bbox.split(',') : []; if (bbox.length !== 4) return callback(new Error('Invalid bbox: ' + util.inspect(bbox)));
The text was updated successfully, but these errors were encountered:
stale.
Sorry, something went wrong.
No branches or pull requests
Just to document for now (no action needed):
The text was updated successfully, but these errors were encountered: