Leaflet.Elevation PR merged (not released, use master)

This commit is contained in:
Norbert Renner 2014-02-08 17:43:56 +01:00
parent 647dc26e1b
commit d05bd937f3
15 changed files with 1152 additions and 18 deletions

View file

@ -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) {