- var control = L.control(options),
- marker = L.marker([0, 0], {draggable: true}),
- locationFilter = new L.LocationFilter({
- enableButton: false,
- adjustButton: false
- });
-
- control.onAdd = function (map) {
- var $container = $('<div>')
- .attr('class', 'control-share');
-
- var button = $('<a>')
- .attr('class', 'control-button')
- .attr('href', '#')
- .attr('title', I18n.t('javascripts.share.title'))
- .html('<span class="icon share"></span>')
- .on('click', toggle)
- .appendTo($container);
-
- var $ui = $('<div>')
- .attr('class', 'share-ui');
-
- $('<div>')
- .attr('class', 'sidebar_heading')
- .appendTo($ui)
- .append(
- $('<a>')
- .text(I18n.t('javascripts.close'))
- .attr('class', 'sidebar_close')
- .attr('href', '#')
- .bind('click', toggle))
- .append(
- $('<h4>')
- .text(I18n.t('javascripts.share.title')));
+ var control = L.OSM.sidebarPane(options, "share", "javascripts.share.title", "javascripts.share.title"),
+ marker = L.marker([0, 0], { draggable: true }),
+ locationFilter = new L.LocationFilter({
+ enableButton: false,
+ adjustButton: false
+ });