convert my_leaflet from coffeescript to javascript and simplify the code