Make choropleth mode work with lines

This commit is contained in:
Yohan Boniface 2023-06-19 19:03:51 +02:00
parent 7b68c52a15
commit 125aa72785
2 changed files with 3 additions and 2 deletions

View file

@ -948,6 +948,7 @@ L.U.Polyline = L.Polyline.extend({
staticOptions: { staticOptions: {
stroke: true, stroke: true,
fill: false, fill: false,
mainColor: 'color',
}, },
isSameClass: function (other) { isSameClass: function (other) {

View file

@ -132,7 +132,7 @@ L.U.Layer.Choropleth = L.FeatureGroup.extend({
_getValue: function (feature) { _getValue: function (feature) {
const key = this.datalayer.options.choropleth.property || 'value' const key = this.datalayer.options.choropleth.property || 'value'
return feature.properties[key] return +feature.properties[key] // TODO: should we catch values non castable to int ?
}, },
computeLimits: function () { computeLimits: function () {