This commit is contained in:
Christian Beutel
2024-06-15 18:13:46 +02:00
parent 48c192376c
commit 369e63972c
27 changed files with 1321 additions and 41 deletions

View File

@@ -195,7 +195,7 @@ https://github.com/iosphere/Leaflet.hotline/
* @returns {Array.<number>} The RGB values as an array [r, g, b]
*/
getRGBForValue: function (value) {
var valueRelative = Math.min(Math.max((value - this._min) / (this._max - this._min), 0), 0.999);
var valueRelative = Math.min(Math.max((value - this._min) / (this._max - this._min), 0), 0.999) || 0;
var paletteIndex = Math.floor(valueRelative * 256) * 4;
return [

View File

@@ -16,7 +16,7 @@ export function Altitude() {
required: this.options.slope,
meta: 'z',
unit: altitude.label,
statsName: 'elevation',
statsName: 'altitude',
deltaMax: this.options.altitudeDeltaMax,
clampRange: this.options.altitudeRange,
// init: ({point}) => {