rename Itinerary control
This commit is contained in:
parent
8fd789a887
commit
d9d74bb221
4 changed files with 5 additions and 5 deletions
28
js/control/Itinerary.js
Normal file
28
js/control/Itinerary.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
BR.Itinerary = L.Class.extend({
|
||||
options: {
|
||||
heading: 'Itinerary'
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
this._content = document.getElementById('itinerary');
|
||||
L.DomUtil.removeClass(this._content.parentElement, 'hidden');
|
||||
this.update();
|
||||
},
|
||||
|
||||
update: function (polyline, segments) {
|
||||
var i, j, iter, html = '';
|
||||
|
||||
html += '<pre>';
|
||||
for (i = 0; segments && i < segments.length; i++)
|
||||
{
|
||||
iter = segments[i].feature.iternity;
|
||||
for (j = 0; iter && j < iter.length; j++)
|
||||
{
|
||||
html += iter[j] + '\n';
|
||||
}
|
||||
}
|
||||
html += '</pre>';
|
||||
|
||||
this._content.innerHTML = html;
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue