@raruto/leaflet-elevation 1.8.6 → 1.8.9

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
@@ -23,6 +23,7 @@ _For a working example see one of the following demos:_
23
23
 
24
24
  <br/>
25
25
 
26
+ - [custom chart](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_extended-ui.html)
26
27
  - [custom colors](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_custom-theme.html)
27
28
  - [custom summary](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_custom-summary.html)
28
29
  - [close button](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_close-button.html)
@@ -48,7 +49,6 @@ _For a working example see one of the following demos:_
48
49
  - [almost over](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_almost-over.html)
49
50
  - [follow marker](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_follow-marker.html)
50
51
  - [dynamic runner](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_dynamic-runner.html)
51
- - [extended ui](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_extended-ui.html)
52
52
 
53
53
  ---
54
54
 
@@ -258,7 +258,7 @@ _Related: [Leaflet-UI presets](https://github.com/raruto/leaflet-ui), [QGIS Inte
258
258
  **Compatibile with:**
259
259
  [![Leaflet 1.x compatible!](https://img.shields.io/badge/Leaflet-1.6.0-1EB300.svg?style=flat)](http://leafletjs.com/reference.html)
260
260
  [![d3.js v6 compatibile!](https://img.shields.io/badge/d3.js-6.5-1EB300.svg?style=flat)](https://www.npmjs.com/package/d3)
261
- [![@tmcw/togeojson v4.3.0 compatibile!](https://img.shields.io/badge/@tmcw/togeojson-4.3-1EB300.svg?style=flat)](https://www.npmjs.com/package/@tmcw/togeojson)
261
+ [![@tmcw/togeojson v4.5.0 compatibile!](https://img.shields.io/badge/@tmcw/togeojson-4.5-1EB300.svg?style=flat)](https://www.npmjs.com/package/@tmcw/togeojson)
262
262
 
263
263
 
264
264
  ---
@@ -675,8 +675,8 @@
675
675
  var panes = {
676
676
  grid: g.append("g").attr("class", "grid"),
677
677
  area: g.append('g').attr("class", "area"),
678
- point: g.append('g').attr("class", "point"),
679
678
  axis: g.append('g').attr("class", "axis"),
679
+ point: g.append('g').attr("class", "point"),
680
680
  brush: g.append("g").attr("class", "brush"),
681
681
  tooltip: g.append("g").attr("class", "tooltip").attr('display', 'none'),
682
682
  ruler: g.append('g').attr('class', 'ruler'),
@@ -1790,10 +1790,10 @@
1790
1790
  __mileFactor: 0.621371,
1791
1791
  __footFactor: 3.28084,
1792
1792
  __D3: 'https://unpkg.com/d3@6.5.0/dist/d3.min.js',
1793
- __TOGEOJSON: 'https://unpkg.com/@tmcw/togeojson@4.3.0/dist/togeojson.umd.js',
1793
+ __TOGEOJSON: 'https://unpkg.com/@tmcw/togeojson@4.5.0/dist/togeojson.umd.js',
1794
1794
  __LGEOMUTIL: 'https://unpkg.com/leaflet-geometryutil@0.9.3/src/leaflet.geometryutil.js',
1795
1795
  __LALMOSTOVER: 'https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js',
1796
- __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.5/libs/leaflet-distance-marker.min.js',
1796
+ __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.9/libs/leaflet-distance-marker.min.js',
1797
1797
 
1798
1798
  /*
1799
1799
  * Add data to the diagram either from GPX or GeoJSON and update the axis domain and data
@@ -2110,6 +2110,10 @@
2110
2110
  if (!d) {
2111
2111
  return;
2112
2112
  }
2113
+ /**
2114
+ * Standard GeoJSON --> doesn't handle "time", "heart", …
2115
+ */
2116
+
2113
2117
 
2114
2118
  var geom = d.geometry;
2115
2119
 
@@ -2137,47 +2141,47 @@
2137
2141
  return _this5._addData(feature);
2138
2142
  });
2139
2143
  }
2144
+ /**
2145
+ * Extended GeoJSON --> rely on leaflet implementation
2146
+ */
2147
+
2140
2148
 
2141
2149
  if (d._latlngs) {
2142
- this._addGPXData(d._latlngs);
2150
+ this._addGeoJSONData(d._latlngs, d.feature && d.feature.properties);
2143
2151
  }
2144
2152
  },
2145
2153
 
2146
2154
  /*
2147
2155
  * Parsing of GeoJSON data lines and their elevation in z-coordinate
2148
2156
  */
2149
- _addGeoJSONData: function _addGeoJSONData(coords) {
2157
+ _addGeoJSONData: function _addGeoJSONData(coords, properties) {
2150
2158
  var _this6 = this;
2151
2159
 
2152
- each(coords, function (point) {
2153
- _this6._addPoint(point[1], point[0], point[2]);
2154
-
2155
- _this6._fireEvt("elepoint_added", {
2156
- point: point,
2157
- index: _this6._data.length - 1
2158
- });
2159
- });
2160
+ coords.forEach(function (point, i) {
2161
+ var _point$meta, _point$lat, _point$lng, _ref, _point$alt;
2160
2162
 
2161
- this._fireEvt("eletrack_added", {
2162
- coords: coords,
2163
- index: this._data.length - 1
2164
- });
2165
- },
2163
+ // Inspired by L.GPX layer properties
2164
+ point.meta = (_point$meta = point.meta) !== null && _point$meta !== void 0 ? _point$meta : {
2165
+ time: null,
2166
+ ele: null,
2167
+ hr: null,
2168
+ cad: null,
2169
+ atemp: null
2170
+ }; // "alt" property is generated inside "leaflet"
2166
2171
 
2167
- /*
2168
- * Parsing function for GPX data and their elevation in z-coordinate
2169
- */
2170
- _addGPXData: function _addGPXData(coords) {
2171
- var _this7 = this;
2172
+ if ("alt" in point) point.meta.ele = point.alt; // "coordinateProperties" property is generated inside "@tmcw/toGeoJSON"
2172
2173
 
2173
- each(coords, function (point) {
2174
- var _point$alt;
2174
+ if (properties && properties.coordinateProperties) {
2175
+ var props = properties.coordinateProperties;
2176
+ if ("times" in props) point.meta.time = new Date(Date.parse(props.times[i]));
2177
+ if ("heart" in props) point.meta.hr = parseInt(props.heart[i]); // TODO: ask to "@tmcw/toGeoJSON" for "cadence" and "temperature" implementation
2178
+ }
2175
2179
 
2176
- _this7._addPoint(point.lat, point.lng, (_point$alt = point.alt) !== null && _point$alt !== void 0 ? _point$alt : point.meta.ele);
2180
+ _this6._addPoint((_point$lat = point.lat) !== null && _point$lat !== void 0 ? _point$lat : point[1], (_point$lng = point.lng) !== null && _point$lng !== void 0 ? _point$lng : point[0], (_ref = (_point$alt = point.alt) !== null && _point$alt !== void 0 ? _point$alt : point.meta.ele) !== null && _ref !== void 0 ? _ref : point[2]);
2177
2181
 
2178
- _this7._fireEvt("elepoint_added", {
2182
+ _this6._fireEvt("elepoint_added", {
2179
2183
  point: point,
2180
- index: _this7._data.length - 1
2184
+ index: _this6._data.length - 1
2181
2185
  });
2182
2186
  });
2183
2187
 
@@ -2192,9 +2196,9 @@
2192
2196
  */
2193
2197
  _addPoint: function _addPoint(x, y, z) {
2194
2198
  if (this.options.reverseCoords) {
2195
- var _ref = [y, x];
2196
- x = _ref[0];
2197
- y = _ref[1];
2199
+ var _ref2 = [y, x];
2200
+ x = _ref2[0];
2201
+ y = _ref2[1];
2198
2202
  }
2199
2203
 
2200
2204
  this._data.push({
@@ -2237,35 +2241,43 @@
2237
2241
  }
2238
2242
  }
2239
2243
  },
2244
+
2245
+ /**
2246
+ * Initialize "L.AlmostOver" integration
2247
+ */
2240
2248
  _initAlmostOverHandler: function _initAlmostOverHandler(map, layer) {
2241
- var _this8 = this;
2249
+ var _this7 = this;
2242
2250
 
2243
2251
  if (!map || !this.options.almostOver) return;
2244
2252
  this.lazyLoad(this.__LGEOMUTIL).then(function () {
2245
- return _this8.lazyLoad(_this8.__LALMOSTOVER);
2253
+ return _this7.lazyLoad(_this7.__LALMOSTOVER);
2246
2254
  }).then(function () {
2247
2255
  map.addHandler('almostOver', L.Handler.AlmostOver);
2248
2256
 
2249
2257
  if (L.GeometryUtil && map.almostOver && map.almostOver.enabled()) {
2250
2258
  map.almostOver.addLayer(layer);
2251
2259
  map.on('almost:move', function (e) {
2252
- return _this8._mousemoveLayerHandler(e);
2260
+ return _this7._mousemoveLayerHandler(e);
2253
2261
  }).on('almost:out', function (e) {
2254
- return _this8._mouseoutHandler(e);
2262
+ return _this7._mouseoutHandler(e);
2255
2263
  });
2256
2264
  }
2257
2265
  });
2258
2266
  },
2267
+
2268
+ /**
2269
+ * Initialize "L.DistanceMarkers" integration
2270
+ */
2259
2271
  _initDistanceMarkers: function _initDistanceMarkers(map, layer) {
2260
- var _this9 = this;
2272
+ var _this8 = this;
2261
2273
 
2262
2274
  if (!map) return;
2263
2275
 
2264
2276
  if (this.options.distanceMarkers) {
2265
2277
  this.lazyLoad(this.__LGEOMUTIL).then(function () {
2266
- return _this9.lazyLoad(_this9.__LDISTANCEM);
2278
+ return _this8.lazyLoad(_this8.__LDISTANCEM);
2267
2279
  }).then(function () {
2268
- return _this9.options.polyline && layer.addTo(map);
2280
+ return _this8.options.polyline && layer.addTo(map);
2269
2281
  });
2270
2282
  } else if (this.options.polyline) {
2271
2283
  layer.addTo(map);
@@ -2292,6 +2304,29 @@
2292
2304
  return this.eleDiv = eleDiv;
2293
2305
  },
2294
2306
 
2307
+ /**
2308
+ * Initialize "L.AlmostOver" and "L.DistanceMarkers"
2309
+ */
2310
+ _initMapIntegrations: function _initMapIntegrations(control, layer) {
2311
+ var map = control._map;
2312
+
2313
+ if (control._map) {
2314
+ map.once('layeradd', function (e) {
2315
+ return control.options.autofitBounds && control.fitBounds(layer.getBounds());
2316
+ });
2317
+
2318
+ if (!L.Browser.mobile) {
2319
+ control._initAlmostOverHandler(map, layer);
2320
+
2321
+ control._initDistanceMarkers(map, layer);
2322
+ } else if (control.options.polyline) {
2323
+ layer.addTo(map);
2324
+ }
2325
+ } else {
2326
+ console.warn("Undefined elevation map object");
2327
+ }
2328
+ },
2329
+
2295
2330
  /*
2296
2331
  * Collapse current chart control.
2297
2332
  */
@@ -2343,17 +2378,17 @@
2343
2378
  * @link https://github.com/Raruto/leaflet-elevation/issues/81#issuecomment-713477050
2344
2379
  */
2345
2380
  _fixTooltipSize: function _fixTooltipSize() {
2346
- var _this10 = this;
2381
+ var _this9 = this;
2347
2382
 
2348
2383
  this.on('elechart_init', function () {
2349
- return _this10.once('elechart_change elechart_hover', function (e) {
2350
- if (_this10._chartEnabled) {
2351
- _this10._chart._showDiagramIndicator(e.data, e.xCoord);
2384
+ return _this9.once('elechart_change elechart_hover', function (e) {
2385
+ if (_this9._chartEnabled) {
2386
+ _this9._chart._showDiagramIndicator(e.data, e.xCoord);
2352
2387
 
2353
- _this10._chart._showDiagramIndicator(e.data, e.xCoord);
2388
+ _this9._chart._showDiagramIndicator(e.data, e.xCoord);
2354
2389
  }
2355
2390
 
2356
- _this10._updateMarker(e.data);
2391
+ _this9._updateMarker(e.data);
2357
2392
  });
2358
2393
  });
2359
2394
  },
@@ -2434,17 +2469,17 @@
2434
2469
  this._fireEvt("elechart_init");
2435
2470
  },
2436
2471
  _initLayer: function _initLayer() {
2437
- var _this11 = this;
2472
+ var _this10 = this;
2438
2473
 
2439
2474
  this._layers.on('layeradd layerremove', function (e) {
2440
2475
  var layer = e.layer;
2441
2476
  var node = layer.getElement && layer.getElement();
2442
2477
 
2443
- toggleClass(node, _this11.options.polyline.className + ' ' + _this11.options.theme, e.type == 'layeradd');
2478
+ toggleClass(node, _this10.options.polyline.className + ' ' + _this10.options.theme, e.type == 'layeradd');
2444
2479
 
2445
- toggleEvent(layer, "mousemove", _this11._mousemoveLayerHandler.bind(_this11), e.type == 'layeradd');
2480
+ toggleEvent(layer, "mousemove", _this10._mousemoveLayerHandler.bind(_this10), e.type == 'layeradd');
2446
2481
 
2447
- toggleEvent(layer, "mouseout", _this11._mouseoutHandler.bind(_this11), e.type == 'layeradd');
2482
+ toggleEvent(layer, "mouseout", _this10._mouseoutHandler.bind(_this10), e.type == 'layeradd');
2448
2483
  });
2449
2484
  },
2450
2485
  _initMarker: function _initMarker(map) {
@@ -2516,15 +2551,15 @@
2516
2551
  * Retrieve data from a remote url (HTTP).
2517
2552
  */
2518
2553
  _loadFile: function _loadFile(url) {
2519
- var _this12 = this;
2554
+ var _this11 = this;
2520
2555
 
2521
2556
  fetch(url).then(function (response) {
2522
2557
  return response.text();
2523
2558
  }).then(function (data) {
2524
- _this12._downloadURL = url; // TODO: handle multiple urls?
2559
+ _this11._downloadURL = url; // TODO: handle multiple urls?
2525
2560
 
2526
- _this12._parseFromString(data).then(function (geojson) {
2527
- return geojson && _this12._loadLayer(geojson);
2561
+ _this11._parseFromString(data).then(function (geojson) {
2562
+ return geojson && _this11._loadLayer(geojson);
2528
2563
  });
2529
2564
  }).catch(function (err) {
2530
2565
  return console.warn(err);
@@ -2596,53 +2631,16 @@
2596
2631
  }
2597
2632
  },
2598
2633
  onEachFeature: function onEachFeature(feature, layer) {
2599
- if (feature.geometry && feature.geometry.type == 'Point') return; // Standard GeoJSON --> doesn't handle "time"
2600
- // control.addData(feature, layer); // NB make use of "_addGeoJSONData"
2601
- // Extended GeoJSON --> rely on leaflet implementation
2602
-
2603
- layer._latlngs.forEach(function (point, i) {
2604
- // same properties as L.GPX layer
2605
- point.meta = {
2606
- time: null,
2607
- ele: null,
2608
- hr: null,
2609
- cad: null,
2610
- atemp: null
2611
- };
2612
- if ("alt" in point) point.meta.ele = point.alt;
2613
-
2614
- if (feature.properties) {
2615
- var prop = feature.properties;
2616
- if ("coordTimes" in prop) point.meta.time = new Date(Date.parse(prop.coordTimes[i]));else if ("times" in prop) point.meta.time = new Date(Date.parse(prop.times[i]));else if ("time" in prop) point.meta.time = new Date(Date.parse(_typeof(prop.time) === 'object' ? prop.time[i] : prop.time));
2617
- if ("heartRates" in prop) point.meta.hr = parseInt(prop.heartRates[i]);else if ("heartRate" in prop) point.meta.hr = parseInt(_typeof(prop.heartRate) === 'object' ? prop.heartRate[i] : prop.heartRate); // TODO: cadence, temperature
2618
- }
2619
- });
2620
-
2621
- control.addData(layer); // NB make use of "_addGPXData"
2622
-
2623
- control.track_info = L.extend({}, control.track_info, {
2624
- name: geojson.name
2625
- });
2634
+ if (feature.geometry && feature.geometry.type != 'Point') {
2635
+ control.addData(layer);
2636
+ control.track_info = L.extend({}, control.track_info, {
2637
+ name: geojson.name
2638
+ });
2639
+ }
2626
2640
  }
2627
2641
  });
2628
2642
  control.lazyLoad(control.__D3).then(function () {
2629
- var map = control._map;
2630
-
2631
- if (map) {
2632
- map.once('layeradd', function (e) {
2633
- return control.options.autofitBounds && control.fitBounds(layer.getBounds());
2634
- });
2635
-
2636
- if (!L.Browser.mobile) {
2637
- control._initAlmostOverHandler(map, layer);
2638
-
2639
- control._initDistanceMarkers(map, layer);
2640
- } else if (control.options.polyline) {
2641
- layer.addTo(map);
2642
- }
2643
- } else {
2644
- console.warn("Undefined elevation map object");
2645
- }
2643
+ control._initMapIntegrations(control, layer);
2646
2644
 
2647
2645
  control._fireEvt("eledata_loaded", {
2648
2646
  data: geojson,
@@ -2748,21 +2746,21 @@
2748
2746
  * Attempt to parse raw response data (GeoJSON or XML > GeoJSON)
2749
2747
  */
2750
2748
  _parseFromString: function _parseFromString(data) {
2751
- var _this13 = this;
2749
+ var _this12 = this;
2752
2750
 
2753
2751
  return new Promise(function (resolve) {
2754
- return _this13.lazyLoad(_this13.__TOGEOJSON).then(function () {
2752
+ return _this12.lazyLoad(_this12.__TOGEOJSON).then(function () {
2755
2753
  var geojson;
2756
2754
 
2757
2755
  try {
2758
- geojson = _this13._parseFromXMLString(data.trim());
2756
+ geojson = _this12._parseFromXMLString(data.trim());
2759
2757
  } catch (e) {
2760
- geojson = _this13._parseFromGeoJSONString(data.toString());
2758
+ geojson = _this12._parseFromGeoJSONString(data.toString());
2761
2759
  }
2762
2760
 
2763
2761
  if (geojson) {
2764
- geojson = _this13._prepareMultiLineStrings(geojson);
2765
- geojson = _this13._prepareAdditionalProperties(geojson);
2762
+ geojson = _this12._prepareMultiLineStrings(geojson);
2763
+ geojson = _this12._prepareAdditionalProperties(geojson);
2766
2764
  }
2767
2765
 
2768
2766
  resolve(geojson);
@@ -2841,10 +2839,10 @@
2841
2839
  * Add a point of interest over the diagram
2842
2840
  */
2843
2841
  _registerCheckPoint: function _registerCheckPoint(props) {
2844
- var _this14 = this;
2842
+ var _this13 = this;
2845
2843
 
2846
2844
  this.on("elechart_updated", function () {
2847
- return _this14._chart._registerCheckPoint(props);
2845
+ return _this13._chart._registerCheckPoint(props);
2848
2846
  });
2849
2847
  },
2850
2848
 
@@ -2852,10 +2850,10 @@
2852
2850
  * Add chart profile to diagram
2853
2851
  */
2854
2852
  _registerAreaPath: function _registerAreaPath(props) {
2855
- var _this15 = this;
2853
+ var _this14 = this;
2856
2854
 
2857
2855
  this.on("elechart_init", function () {
2858
- return _this15._chart._registerAreaPath(props);
2856
+ return _this14._chart._registerAreaPath(props);
2859
2857
  });
2860
2858
  },
2861
2859
 
@@ -2863,10 +2861,10 @@
2863
2861
  * Add chart grid to diagram
2864
2862
  */
2865
2863
  _registerAxisGrid: function _registerAxisGrid(props) {
2866
- var _this16 = this;
2864
+ var _this15 = this;
2867
2865
 
2868
2866
  this.on("elechart_axis", function () {
2869
- return _this16._chart._registerAxisGrid(props);
2867
+ return _this15._chart._registerAxisGrid(props);
2870
2868
  });
2871
2869
  },
2872
2870
 
@@ -2874,10 +2872,10 @@
2874
2872
  * Add chart axis to diagram
2875
2873
  */
2876
2874
  _registerAxisScale: function _registerAxisScale(props) {
2877
- var _this17 = this;
2875
+ var _this16 = this;
2878
2876
 
2879
2877
  this.on("elechart_axis", function () {
2880
- return _this17._chart._registerAxisScale(props);
2878
+ return _this16._chart._registerAxisScale(props);
2881
2879
  });
2882
2880
  },
2883
2881
 
@@ -2885,14 +2883,14 @@
2885
2883
  * Add chart or marker tooltip info
2886
2884
  */
2887
2885
  _registerTooltip: function _registerTooltip(props) {
2888
- var _this18 = this;
2886
+ var _this17 = this;
2889
2887
 
2890
2888
  if (props.chart) {
2891
2889
  var label = L.extend({}, props, {
2892
2890
  value: props.chart
2893
2891
  });
2894
2892
  this.on("elechart_init", function () {
2895
- return _this18._chart._registerTooltip(label);
2893
+ return _this17._chart._registerTooltip(label);
2896
2894
  });
2897
2895
  }
2898
2896
 
@@ -2902,7 +2900,7 @@
2902
2900
  });
2903
2901
 
2904
2902
  this.on("elechart_marker", function () {
2905
- return _this18._marker._registerTooltip(_label);
2903
+ return _this17._marker._registerTooltip(_label);
2906
2904
  });
2907
2905
  }
2908
2906
  },
@@ -2911,10 +2909,10 @@
2911
2909
  * Add summary info to diagram
2912
2910
  */
2913
2911
  _registerSummary: function _registerSummary(props) {
2914
- var _this19 = this;
2912
+ var _this18 = this;
2915
2913
 
2916
2914
  this.on('elechart_summary', function () {
2917
- return _this19._summary._registerSummary(props);
2915
+ return _this18._summary._registerSummary(props);
2918
2916
  });
2919
2917
  },
2920
2918
 
@@ -3019,17 +3017,14 @@
3019
3017
  * Toggle chart data on legend click
3020
3018
  */
3021
3019
  _toggleChartHandler: function _toggleChartHandler(e) {
3022
- var _this20 = this;
3020
+ var _this19 = this;
3023
3021
 
3024
- var path = e.path,
3025
- name = e.name,
3022
+ var name = e.name,
3026
3023
  enabled = e.enabled;
3027
3024
  this._chartEnabled = this._chart._hasActiveLayers(); // toggle layer visibility on empty chart
3028
3025
 
3029
3026
  this._layers.eachLayer(function (layer) {
3030
- var node = layer.getElement && layer.getElement();
3031
-
3032
- toggleClass(node, _this20.options.polyline.className + ' ' + _this20.options.theme, _this20._chartEnabled);
3027
+ return toggleClass(layer.getElement && layer.getElement(), _this19.options.polyline.className + ' ' + _this19.options.theme, _this19._chartEnabled);
3033
3028
  }); // toggle option value (eg. altitude = { 'disabled' || 'disabled' })
3034
3029
 
3035
3030
 
@@ -3103,7 +3098,7 @@
3103
3098
  * Update chart summary.
3104
3099
  */
3105
3100
  _updateSummary: function _updateSummary() {
3106
- var _this21 = this;
3101
+ var _this20 = this;
3107
3102
 
3108
3103
  this._summary.reset();
3109
3104
 
@@ -3126,9 +3121,9 @@
3126
3121
  e.confirm();
3127
3122
  }
3128
3123
 
3129
- _this21._fireEvt('eletrack_download', {
3130
- downloadLink: _this21.options.downloadLink,
3131
- confirm: saveFile.bind(_this21, _this21._downloadURL)
3124
+ _this20._fireEvt('eletrack_download', {
3125
+ downloadLink: _this20.options.downloadLink,
3126
+ confirm: saveFile.bind(_this20, _this20._downloadURL)
3132
3127
  });
3133
3128
  };
3134
3129
  }
@@ -3851,6 +3846,8 @@
3851
3846
  this.loadGeoJSON = this.load;
3852
3847
  this.loadXML = this.load;
3853
3848
  this.loadFile = this.load;
3849
+ this._addGPXData = this._addGeoJSONData;
3850
+ this._registerFocusLabel = this._registerTooltip;
3854
3851
  });
3855
3852
 
3856
3853
  L.control.elevation = function (options) {