initial commit
This commit is contained in:
parent
37980ff82b
commit
4cc16bccd0
17 changed files with 789 additions and 0 deletions
20
js/control/Download.js
Normal file
20
js/control/Download.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
BR.Download = BR.Control.extend({
|
||||
options: {
|
||||
heading: 'Download'
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
var container = BR.Control.prototype.onAdd.call(this, map);
|
||||
return container;
|
||||
},
|
||||
|
||||
update: function (urls) {
|
||||
var html = '<div class="label"> </div><div class="value">';
|
||||
if (urls.gpx) {
|
||||
html += '<a href="' + urls.gpx + '" download="brouter.gpx" target="_blank">GPX</a> · ';
|
||||
html += '<a href="' + urls.kml + '" download="brouter.kml" target="_blank">KML</a>';
|
||||
}
|
||||
html += '</div>'
|
||||
this._content.innerHTML = html;
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue