iD.DrawWay = { enter: function(map) { console.log('entering'); return 'foo'; }, exit: function(map) { } };