Hide route steps sidebar when user presses close button.
This commit is contained in:
parent
2dd89f2d08
commit
56b2fdf5c9
1 changed files with 8 additions and 0 deletions
|
@ -253,6 +253,14 @@ OSM.Directions = function (map) {
|
|||
$('#sidebar_content').append('<p id="routing_credit">' +
|
||||
I18n.t('javascripts.directions.instructions.courtesy', {link: chosenEngine.creditline}) +
|
||||
'</p>');
|
||||
|
||||
$('#sidebar_content a.geolink').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
map.removeLayer(polyline);
|
||||
$('#sidebar_content').html('');
|
||||
map.setSidebarOverlaid(true);
|
||||
// TODO: collapse width of sidebar back to previous
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue