@raruto/leaflet-elevation 2.5.2 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ _For a working example see one of the following demos:_
|
|
|
47
47
|
- [slope chart](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_slope-chart.html)
|
|
48
48
|
- [speed chart](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_speed-chart.html)
|
|
49
49
|
- [temperature chart](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_temperature-chart.html)
|
|
50
|
+
- [bathymetry data](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_bathymetry.html)
|
|
50
51
|
- [walking marker](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_dynamic-runner.html)
|
|
51
52
|
|
|
52
53
|
---
|
|
@@ -403,6 +403,8 @@
|
|
|
403
403
|
|
|
404
404
|
this._data = [];
|
|
405
405
|
this.track_info = {};
|
|
406
|
+
this._yCoordMin = 0;
|
|
407
|
+
this._yCoordMax = -Infinity;
|
|
406
408
|
|
|
407
409
|
this._fireEvt("eledata_clear");
|
|
408
410
|
|
|
@@ -518,6 +520,7 @@
|
|
|
518
520
|
this._start = L.circleMarker([0,0], (opts.trkStart || Options.trkStart));
|
|
519
521
|
this._end = L.circleMarker([0,0], (opts.trkEnd || Options.trkEnd));
|
|
520
522
|
this._chartEnabled = true;
|
|
523
|
+
this._yCoordMin = 0;
|
|
521
524
|
this._yCoordMax = -Infinity;
|
|
522
525
|
this.track_info = {};
|
|
523
526
|
// this.handlers = [];
|
|
@@ -694,6 +697,7 @@
|
|
|
694
697
|
|
|
695
698
|
this.fire("elepoint_added", { point: point, index: this._data.length - 1 });
|
|
696
699
|
|
|
700
|
+
if (this._yCoordMin > this._data[this._data.length - 1][this.options.yAttr]) this._yCoordMin = this._data[this._data.length - 1][this.options.yAttr];
|
|
697
701
|
if (this._yCoordMax < this._data[this._data.length - 1][this.options.yAttr]) this._yCoordMax = this._data[this._data.length - 1][this.options.yAttr];
|
|
698
702
|
});
|
|
699
703
|
|
|
@@ -1129,7 +1133,7 @@
|
|
|
1129
1133
|
if ([true, 'markers'].includes(waypoints) && wptIcons != false) {
|
|
1130
1134
|
return this._registerMarker({
|
|
1131
1135
|
latlng : latlng,
|
|
1132
|
-
sym : (sym ?? name).replace('
|
|
1136
|
+
sym : (sym ?? name).replace(/["']/g, '').replace(/ /g, '-').toLowerCase(),
|
|
1133
1137
|
content: [true, 'markers'].includes(wptLabels) && (name || desc) && decodeURI("<b>" + name + "</b>" + (desc.length > 0 ? '<br>' + desc : ''))
|
|
1134
1138
|
});
|
|
1135
1139
|
}
|
|
@@ -1593,6 +1597,7 @@
|
|
|
1593
1597
|
this._marker.update({
|
|
1594
1598
|
map : this._map,
|
|
1595
1599
|
item : item,
|
|
1600
|
+
yCoordMin : this._yCoordMin,
|
|
1596
1601
|
yCoordMax : this._yCoordMax || 0,
|
|
1597
1602
|
options : this.options
|
|
1598
1603
|
});
|