1 L.OSM.note = function (options) {
2 var control = L.control(options);
4 control.onAdd = function (map) {
5 var $container = $('<div>')
6 .attr('class', 'control-note');
9 .attr('class', 'control-button')
11 .attr('title', 'Notes')
12 .html('<span class="icon note"></span>')
14 .appendTo($container);
20 if (map.hasLayer(map.noteLayer)) {
21 map.removeLayer(map.noteLayer);
23 map.addLayer(map.noteLayer);