fixed cartocss updating for windshaft provider
This commit is contained in:
parent
3db6aad219
commit
6eb7028a61
@ -252,6 +252,7 @@ GMapsTorqueLayer.prototype = _.extend({},
|
|||||||
|
|
||||||
// provider options
|
// provider options
|
||||||
var options = torque.common.TorqueLayer.optionsFromLayer(shader.findLayer({ name: 'Map' }));
|
var options = torque.common.TorqueLayer.optionsFromLayer(shader.findLayer({ name: 'Map' }));
|
||||||
|
this.provider.setCartoCSS && this.provider.setCartoCSS(cartocss);
|
||||||
if(this.provider && this.provider.setOptions(options)) {
|
if(this.provider && this.provider.setOptions(options)) {
|
||||||
this._reloadTiles();
|
this._reloadTiles();
|
||||||
}
|
}
|
||||||
|
@ -236,9 +236,11 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|||||||
|
|
||||||
// provider options
|
// provider options
|
||||||
var options = torque.common.TorqueLayer.optionsFromLayer(shader.findLayer({ name: 'Map' }));
|
var options = torque.common.TorqueLayer.optionsFromLayer(shader.findLayer({ name: 'Map' }));
|
||||||
|
this.provider.setCartoCSS && this.provider.setCartoCSS(cartocss);
|
||||||
if(this.provider.setOptions(options)) {
|
if(this.provider.setOptions(options)) {
|
||||||
this._reloadTiles();
|
this._reloadTiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(this.options, options);
|
_.extend(this.options, options);
|
||||||
|
|
||||||
// animator options
|
// animator options
|
||||||
|
@ -183,6 +183,10 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setCartoCSS: function(c) {
|
||||||
|
this.options.cartocss = c;
|
||||||
|
},
|
||||||
|
|
||||||
setOptions: function(opt) {
|
setOptions: function(opt) {
|
||||||
var refresh = false;
|
var refresh = false;
|
||||||
|
|
||||||
@ -354,7 +358,7 @@
|
|||||||
"layers": [{
|
"layers": [{
|
||||||
"type": "torque",
|
"type": "torque",
|
||||||
"options": {
|
"options": {
|
||||||
"cartocss_version": "2.1.1",
|
"cartocss_version": "1.0.0",
|
||||||
"cartocss": this.options.cartocss,
|
"cartocss": this.options.cartocss,
|
||||||
"sql": this.getSQL()
|
"sql": this.getSQL()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user