Leaflet.Elevation PR merged (not released, use master)
This commit is contained in:
parent
647dc26e1b
commit
d05bd937f3
15 changed files with 1152 additions and 18 deletions
|
|
@ -11,21 +11,6 @@ BR.Elevation = L.Control.Elevation.extend({
|
|||
theme: "steelblue-theme" //purple
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
this._data = [];
|
||||
this._dist = 0;
|
||||
this._maxElevation = 0;
|
||||
|
||||
// workaround for 'Error: Problem parsing d=""' in Webkit when empty data
|
||||
// https://groups.google.com/d/msg/d3-js/7rFxpXKXFhI/HzIO_NPeDuMJ
|
||||
//this._areapath.datum(this._data).attr("d", this._area);
|
||||
this._areapath.attr("d", "M0 0");
|
||||
|
||||
this._x.domain([0,1]);
|
||||
this._y.domain([0,1]);
|
||||
this._updateAxis();
|
||||
},
|
||||
|
||||
update: function(track) {
|
||||
this.clear();
|
||||
if (track && track.getLatLngs().length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue