nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 3d24ec0eef4e3c022bfc39c910b46dd5b733474b
parent e655f9c0e97ef0ec706c4bd24e611e22b51911f3
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Sat, 18 Feb 2017 22:28:05 +0300

[track_list] fixed sampling interval calculation for elevation profile

Diffstat:
Msrc/lib/leaflet.control.track-list/track-list.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js @@ -1018,8 +1018,8 @@ L.Control.TrackList = L.Control.extend({ if (this._elevationControl) { this._elevationControl.removeFrom(this._map); } - this._elevationControl = new L.Control.ElevationProfile(path, { - samplingInterval: this.calcSamplingInterval(track.length()) + this._elevationControl = new L.Control.ElevationProfile(this._map, path, { + samplingInterval: this.calcSamplingInterval(new L.MeasuredLine(path).getLength()) } ).addTo(this._map);