Releases: balladaniel/leaflet-dataclassification
Releases · balladaniel/leaflet-dataclassification
v1.2.3
Improvements, fixes
- fixed a rounding issue regarding the upper interval boundary value of the lowest class, which came up when classRounding after classifying into a low number of target classes
- replaced all debug-related log messages with console.debug(), instead of the more intrusive overwriting of the global console.log function
From now on, if you encounter bugs, please include the verbose console output in your issue report (enable Verbose level/logging in your browser console to show debug messages)
v1.2.2
New features
- Legend: class feature counts
legendTemplate
: new placeholder option{count}
for including feature count in row of a given class interval. For example:
Legend row template example with {count} placeholder |
|
---|---|
Highest: {low}+ [{count}] |
730000+ [2] |
Middle: {low} – {high} [{count}] |
350000 - 730000 [9] |
Middle: {low} – {high} [{count}] |
120000 - 350000 [16] |
Lowest: < {high} [{count}] |
< 120000 [23] |
Nodata: No data [{count}] |
No data [3] |
Improvements, fixes
- reworked the main
classes
array as an array of objects (boundary value is accessible throughclasses[n].value
) - to aid feature counting, value evaluators now add up the number of found features for a given class, stored in the
classes
array (classes[n].featureCount
property). Nodata/null features also get counted, stored in theclasses.nodataFeatureCount
property - modified
classRounding
,unitModifier
,middlePointValue
, classification and color-generation logic to support classes as objects, instead of a plain array of numbers - fixed the ignoring of nodata legend row template in some cases
- fixed some legend rows still not having css class
legendDataRow
- css class
legendDataRow
: added a right margin of 4px - updated examples (
combined.html
andpoints_s.html
: feature counts are included in legend template to showcase feature;polygons.html
: minor tweak for legend title) - updated documentation
- updated main screenshot
v1.2
New features
-
Null/nodata feature handling logic
- new option
noDataColor
: fill color to use for features with null/nodata attribute values. In polygon, point-color and line-color modes. (default: '#606060'). Also appears in legend as a separate class/category. Currently, null/nodata features are not assigned a distinctive symbol when in point-size and line-width modes. - new option
noDataIgnore
: if true, features with null attribute values are not shown on the map. This also means the legend will not have a nodata classs (default: false) - new option
nodata
inlegendTemplate
: you can now customize the nodata text in Legend
- new option
Improvements
- modified classification code to filter out null attribute values when generating classes
- more thorough check for non-existing attribute field vs. null as attribute value (with more concise error messages)
- legend data rows (symbol + key) now have a css class (
legendDataRow
), set in leaflet-dataclassification.css, resulting in a cleaner legend-generation code - updated documentation