use tab instead of separate control for transit demo

This commit is contained in:
Norbert Renner 2016-06-03 21:08:48 +02:00
parent 8bd8fc3256
commit 4f558a0956
11 changed files with 52 additions and 24 deletions

View file

@ -1,18 +1,18 @@
BR.Iternity = BR.Control.extend({
BR.Iternity = L.Class.extend({
options: {
heading: 'Iternity'
},
onAdd: function (map) {
var container = BR.Control.prototype.onAdd.call(this, map);
this._content = document.getElementById('iternity');
L.DomUtil.removeClass(this._content.parentElement, 'hidden');
this.update();
return container;
},
update: function (polyline, segments) {
var i, j, iter, html = '';
html += '<small><pre>';
html += '<pre>';
for (i = 0; segments && i < segments.length; i++)
{
iter = segments[i].feature.iternity;
@ -21,7 +21,7 @@ BR.Iternity = BR.Control.extend({
html += iter[j] + '\n';
}
}
html += '</pre></small>';
html += '</pre>';
this._content.innerHTML = html;
}