commit ae868d0bb0e6f35db023195ac530b901fde5611b
parent 33511c50900db993a3852c6a0958e2212d8836cf
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Wed, 10 Oct 2018 21:22:51 +0200
[elevation profile] fix empty profile to the east from meridian 180 #139
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/lib/leaflet.control.elevation-profile/index.js b/src/lib/leaflet.control.elevation-profile/index.js
@@ -227,6 +227,7 @@ const ElevationProfile = L.Class.extend({
             L.setOptions(this, options);
             this.path = latlngs;
             var samples = this.samples = pathRegularSamples(this.path, this.options.samplingInterval);
+            samples = samples.map(latlng => latlng.wrap());
             if (!samples.length) {
                 notify('Track is empty');
                 return;