Make choropleth mode work with lines
This commit is contained in:
parent
7b68c52a15
commit
125aa72785
2 changed files with 3 additions and 2 deletions
|
@ -948,6 +948,7 @@ L.U.Polyline = L.Polyline.extend({
|
|||
staticOptions: {
|
||||
stroke: true,
|
||||
fill: false,
|
||||
mainColor: 'color',
|
||||
},
|
||||
|
||||
isSameClass: function (other) {
|
||||
|
|
|
@ -132,7 +132,7 @@ L.U.Layer.Choropleth = L.FeatureGroup.extend({
|
|||
|
||||
_getValue: function (feature) {
|
||||
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 () {
|
||||
|
|
Loading…
Reference in a new issue