Set tree data just before render happens
This commit is contained in:
parent
fd4caf7595
commit
975abe9b5c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user