+ control.onAdd = function (map) {
+ var $container = $("<div>")
+ .attr("class", "control-" + uiClass);
+
+ var button = $("<a>")
+ .attr("class", "control-button")
+ .attr("href", "#")
+ .html("<span class=\"icon " + uiClass + "\"></span>")
+ .on("click", toggle);
+
+ if (buttonTitle) {
+ button.attr("title", I18n.t(buttonTitle));
+ }
+
+ button.appendTo($container);
+