Set tree data just before render happens

This commit is contained in:
Raul Ochoa 2017-02-01 11:16:03 +01:00
parent fd4caf7595
commit 975abe9b5c

View File

@ -279,14 +279,14 @@ CartoCSS.prototype = {
carto.RendererJS = function (options) {
this.options = options || {};
var reference = this.options.reference || require('./torque-reference').version.latest;
tree.Reference.setData(reference);
this.options.mapnik_version = this.options.mapnik_version || 'latest';
this.reference = this.options.reference || require('./torque-reference').version.latest;
this.options.strict = this.options.hasOwnProperty('strict') ? this.options.strict : false;
};
// Prepare a javascript object which contains the layers
carto.RendererJS.prototype.render = function render(cartocss, callback) {
tree.Reference.setData(this.reference);
return new CartoCSS(cartocss, this.options);
}